📝」 doc(auth): should be complete

This commit is contained in:
2025-09-01 19:35:37 +02:00
parent 4c4b9ca5ef
commit 98a6b50fd0
4 changed files with 156 additions and 11 deletions

View File

@ -1,9 +1,9 @@
# Register
Available endpoints:
- `/register`
- `/register/google`
- `/register/google/callback`
- POST `/register`
- GET `/register/google`
- GET `/register/google/callback`
Common return:
- 500 with response
@ -13,7 +13,9 @@ Common return:
}
```
## `/register`
## POST `/register`
Used to register
Input needed :
```json
@ -37,16 +39,27 @@ Can return:
}
```
## `/register/google`
## GET `/register/google`
Does not take input
Used to redirect to the google auth page
Always return:
- redirect to the google auth url
## `/register/google/callback`
## GET `/register/google/callback`
inputs are filled by google
Used to get the callback from google and register
Can return:
- 400 with response
```json
{
"error": "<corresponding error>"
}
```
- 200 with response and cookie in header
```json
{
"msg": "Register successfully"
}
```