mirror of
https://github.com/KeyZox71/knl_meowscendence.git
synced 2025-10-13 18:44:45 +02:00
「🎉」 init: started writing doc for auth api
This commit is contained in:
0
doc/auth/2fa.md
Normal file
0
doc/auth/2fa.md
Normal file
6
doc/auth/login.md
Normal file
6
doc/auth/login.md
Normal file
@ -0,0 +1,6 @@
|
||||
# Login
|
||||
|
||||
Abailable endpoints:
|
||||
- `/login`
|
||||
- `/login/google`
|
||||
- `/login/google/callback`
|
52
doc/auth/register.md
Normal file
52
doc/auth/register.md
Normal file
@ -0,0 +1,52 @@
|
||||
# Register
|
||||
|
||||
Available endpoints:
|
||||
- `/register`
|
||||
- `/register/google`
|
||||
- `/register/google/callback`
|
||||
|
||||
Common return:
|
||||
- 500 with response
|
||||
```json
|
||||
{
|
||||
"error": "Internal server error"
|
||||
}
|
||||
```
|
||||
|
||||
## `/register`
|
||||
|
||||
Input needed :
|
||||
```json
|
||||
{
|
||||
"user": "<string>",
|
||||
"password": "<string>"
|
||||
}
|
||||
```
|
||||
|
||||
Can return:
|
||||
- 200 with response and cookie in header
|
||||
```json
|
||||
{
|
||||
"msg": "Register successfully"
|
||||
}
|
||||
```
|
||||
- 400 with response
|
||||
```json
|
||||
{
|
||||
"error": "<corresponding error>"
|
||||
}
|
||||
```
|
||||
|
||||
## `/register/google`
|
||||
|
||||
Does not take input
|
||||
|
||||
Always return:
|
||||
- redirect to the google auth url
|
||||
|
||||
## `/register/google/callback`
|
||||
|
||||
inputs are filled by google
|
||||
|
||||
Can return:
|
||||
- 400 with response
|
Reference in New Issue
Block a user