GitHub OAuth - Handle Callback
curl --request POST \
--url https://api.app.shinzo.ai/auth/oauth/github/callback \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"code": "<string>",
"state": "<string>",
"token": "<string>",
"user": {},
"isNewUser": true
}
'Authentication
GitHub OAuth - Handle Callback
Complete GitHub OAuth authentication with the authorization code.
POST
/
auth
/
oauth
/
github
/
callback
GitHub OAuth - Handle Callback
curl --request POST \
--url https://api.app.shinzo.ai/auth/oauth/github/callback \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"code": "<string>",
"state": "<string>",
"token": "<string>",
"user": {},
"isNewUser": true
}
'Authentication
No authentication required.Body Parameters
string
required
Authorization code from GitHub.
string
State parameter for CSRF protection.
Example Request
curl -X POST "https://api.app.shinzo.ai/auth/oauth/github/callback" \
-H "Content-Type: application/json" \
-d '{
"code": "gho_abc123...",
"state": "random-state-string"
}'
Response
{
"token": "eyJhbGciOiJIUzI1NiIs...",
"user": {
"uuid": "usr_abc123",
"email": "user@github.com"
},
"isNewUser": true
}
Response Fields
string
JWT token for authenticated requests.
object
User profile information.
boolean
Whether this is a new account created via OAuth.
Status Codes
| Code | Description |
|---|---|
200 | Authentication successful |
400 | Invalid request (missing code, invalid state) |
401 | OAuth authentication failed |
Notes
- OAuth users don’t need to verify their email separately
- If a user with the same email already exists (registered via email/password), the accounts are linked
- The
isNewUserfield indicates whether a new account was created or an existing one was used

