/auth/oauth/{provider}/callbackHandle the OAuth authorization callback, retrieve user information, and create a session.
| Name | In | Type | Required | Default | Example | Constraints | Description |
|---|---|---|---|---|---|---|---|
provider |
path |
string |
Yes | OAuth provider | |||
code |
query |
string |
Yes | Authorization code | |||
state |
query |
string |
Yes | State parameter |
| Status | Description | Schema |
|---|---|---|
| 200 | Login successful | dto.OAuthCallbackResponse |
OAuth/SSO callback response
| Field | Type | Required | Example | Constraints | Description |
|---|---|---|---|---|---|
access_token |
string |
No | eyJhbGciOi... |
Access token | |
challenge_token |
string |
No | chg_abc123... |
MFA challenge token | |
expires_in |
integer |
No | 1800 |
Expiration time | |
is_new_user |
boolean |
No | False |
Is new user | |
mfa_check_reason |
string |
No | new_device |
MFA check reason | |
provider |
string |
No | github |
Provider | |
refresh_token |
string |
No | eyJhbGciOi... |
Refresh token | |
required_mfa_methods |
array of string |
No | MFA recommended methods | ||
requires_mfa |
boolean |
No | False |
Requires MFA | |
risk_level |
string |
No | low |
Risk level | |
state |
string |
No | random-state |
State | |
token_type |
string |
No | Bearer |
Token type |