Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dmytrodemianchuk/go-auth
Example of auth on golang with MongoDB
https://github.com/dmytrodemianchuk/go-auth
Last synced: 1 day ago
JSON representation
Example of auth on golang with MongoDB
- Host: GitHub
- URL: https://github.com/dmytrodemianchuk/go-auth
- Owner: DmytroDemianchuk
- Created: 2024-02-07T21:27:44.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2024-02-12T22:01:12.000Z (9 months ago)
- Last Synced: 2024-06-19T20:54:29.927Z (5 months ago)
- Language: Go
- Size: 27.3 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Golang Auth Mongo DB
## Requirements
- docker & docker-compose## API:
### POST /auth/sign-up
Registers new user
#### Example input:
```
{
"email": "[email protected]",
"password": "qwerty123"
}
```### POST /auth/sign-in
Generates JWT Token
#### Example input:
```
{
"email": "[email protected]",
"password": "qwerty123"
}
```#### Example Response:
```
{
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE1NzEwMzgyMjQuNzQ0MzI0MiwidXNlciI6eyJJRCI6IjAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMCIsIlVzZXJuYW1lIjoiemhhc2hrZXZ5Y2giLCJQYXNzd29yZCI6IjQyODYwMTc5ZmFiMTQ2YzZiZDAyNjlkMDViZTM0ZWNmYmY5Zjk3YjUifX0.3dsyKJQ-HZJxdvBMui0Mzgw6yb6If9aB8imGhxMOjsk"
}
```## Start
To run app
```
make run
```