mirror of
https://github.com/KeyZox71/knl_meowscendence.git
synced 2025-10-13 18:44:45 +02:00
886 B
886 B
Register
Available endpoints:
- POST
/register
- GET
/register/google
- GET
/register/google/callback
Common return:
- 500 with response
{
"error": "Internal server error"
}
POST /register
Used to register
Input needed :
{
"user": "<string>",
"password": "<string>"
}
Can return:
- 200 with response and cookie in header
{
"msg": "Register successfully"
}
- 400 with response
{
"error": "<corresponding error>"
}
GET /register/google
Used to redirect to the google auth page
Always return:
- redirect to the google auth url
GET /register/google/callback
Used to get the callback from google and register
Can return:
- 400 with response
{
"error": "<corresponding error>"
}
- 200 with response and cookie in header
{
"msg": "Register successfully"
}