Skip to content

OAuth Callback

POST
/api/v1/auth/web/social/{provider}/callback

Exchange the OAuth code for a session and authenticate the user. Establishes a session cookie for subsequent requests.

provider
required
string

The OAuth provider name.

Example
google
object
code
required

The OAuth authorization code from the provider.

string
4/0AfJohXn...
state

The state parameter for CSRF protection.

string
xyz123
device_name

Must not be greater than 255 characters.

string
n
object
user
object
id
integer
1
name
string
John Doe
email
message
string
Logged in successfully.
{
"user": {
"id": 1,
"name": "John Doe",
"email": "[email protected]"
},
"message": "Logged in successfully."
}

Account inactive

object
message
string
Account is inactive.
{
"message": "Account is inactive."
}

Invalid provider

object
message
string
The given data was invalid.
errors
object
provider
Array<string>
[
"The selected provider is invalid."
]
{
"message": "The given data was invalid.",
"errors": {
"provider": [
"The selected provider is invalid."
]
}
}