Back-End FastAPI wihth Supabase
SUPABASE_URL = " "
SUPABASE_KEY = " "
POST http://127.0.0.1:8000/signup
{
"email" : " string" ,
"password" : " string"
}
curl -X ' POST' \
' http://127.0.0.1:8000/signup' \
-H ' accept: application/json' \
-H ' Content-Type: application/json' \
-d ' {
"email": "string",
"password": "string"
}'
{
"status" : " ok" ,
"data" : {
"user" : {..........
......: ..........
}
}
POST http://127.0.0.1:8000/signin
{
"email" : " string" ,
"password" : " string"
}
curl -X ' POST' \
' http://127.0.0.1:8000/signin' \
-H ' accept: application/json' \
-H ' Content-Type: application/json' \
-d ' {
"email": "string",
"password": "string"
}'
{
"status" : " ok" ,
"data" : {
"user" : {
"id" : " ....." ,
"app_metadata" : {
"provider" : " email" ,
"providers" : [" email" ]
},
"user_metadata" : {},
"aud" : " authenticated"
}
}
}
{
"status" : " ok" ,
"data" : {
"message" : " Invalid login credentials" ,
"name" : " AuthApiError" ,
"status" : 400
}
}
GET http://127.0.0.1:8000/profile
```bash
curl -X 'GET' \
'http://127.0.0.1:8000/profile' \
-H 'accept: application/json'
"status" : " ok" ,
"data" : {
"access_token" : " ....." ,
"data_user" : {
............
}
}
{
"status" : " fail" ,
"data" : " Please login"
}
GET http://127.0.0.1:8000/logout
curl -X ' GET' \
' http://127.0.0.1:8000/logout' \
-H ' accept: application/json'
{
"status" : " ok" ,
"data" : " Sign out successfully"
}