https://github.com/lucasliet/deno-user-auth
user crud poc api to use with deno deploy edge computing and deno kv persistence
https://github.com/lucasliet/deno-user-auth
Last synced: about 2 hours ago
JSON representation
user crud poc api to use with deno deploy edge computing and deno kv persistence
- Host: GitHub
- URL: https://github.com/lucasliet/deno-user-auth
- Owner: lucasliet
- Created: 2022-08-04T01:04:04.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2025-01-12T15:33:02.000Z (6 months ago)
- Last Synced: 2025-06-19T22:06:59.466Z (25 days ago)
- Language: TypeScript
- Homepage: https://user-auth.deno.dev
- Size: 108 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Deno User Authentication
Simple user CRUD to use as a POC to [Deno Deploy](https://deno.com/deploy) with [Deno KV](https://deno.com/kv) persistence all in Edge Computing environment[](https://insomnia.rest/run/?label=deno-user-auth&uri=https%3A%2F%2Fraw.githubusercontent.com%2Flucasliet%2Fdeno-user-auth%2Fmaster%2F.github%2FInsomnia_2022-08-06.yaml)
## Speed Preview

---
## Routes- **Login**
Resource: **POST** `/login`
Body:
```JSON
{
"user": "userName",
"password": "userPassword"
}
```Response:
```JSON
{
"expires_in": 3600,
"access_token": "generated_token"
}
```
> expires_in represents token expiration in seconds
---
- **Register**Resource: **POST** `/register`
Body:
```JSON
{
"user": "userName",
"password": "userPassword"
}
```Response:
```JSON
{
"message": "user userName registered sucessfully"
}
```
---
- **Unregister**Resource: **POST** `/unregister`
Authentication: `Bearer token`
Body:
```JSON
{
"user": "userName"
}
```Response:
```JSON
{
"message": "user teste unregistered sucessfully"
}
```
---
- **Update**Resource: **PUT** `/update_password`
Authentication: `Bearer token`
Body:
```JSON
{
"user": "userName",
"password": "userPassword"
}
```Response:
```JSON
{
"message": "user teste password updated sucessfully"
}
```
---
- **Verify Token**Resource: **GET** `/verify_token`
Authentication: `Bearer token`
Response:
```JSON
{
"expires_in": 3546,
"user": {
"id": "57b55019-9523-4cd8-99c0-403eaac35e95",
"name": "teste"
}
}
```
> expires_in represents token expiration in seconds