SUPABASE_URL=""
SUPABASE_KEY=""
- SUPABASE_URL and SUPABASE_KEY get at https://supabase.com/dashboard/project/
{
"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"
}'
- if success return
{
"status": "ok",
"data": {
"user": {..........
......: ..........
}
}
{
"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"
}'
- if success return
{
"status": "ok",
"data": {
"user": {
"id": ".....",
"app_metadata": {
"provider": "email",
"providers": ["email"]
},
"user_metadata": {},
"aud": "authenticated"
}
}
}
- else return
{
"status": "ok",
"data": {
"message": "Invalid login credentials",
"name": "AuthApiError",
"status": 400
}
}
```bash
curl -X 'GET' \
'http://127.0.0.1:8000/profile' \
-H 'accept: application/json'
- if after login return
"status": "ok",
"data": {
"access_token": ".....",
"data_user": {
............
}
}
- else retern
{
"status": "fail",
"data": "Please login"
}
curl -X 'GET' \
'http://127.0.0.1:8000/logout' \
-H 'accept: application/json'
- if success
{
"status": "ok",
"data": "Sign out successfully"
}