OAuth Callback
POST /api/v1/auth/web/social/{provider}/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.
Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ” provider
required
string
The OAuth provider name.
Example
googleRequest Body required
Section titled “Request Body required ”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
nResponses
Section titled “ Responses ”object
user
object
id
integer
1 name
string
John Doe email
string
john@example.com message
string
Logged in successfully.{ "user": { "id": 1, "name": "John Doe", "email": "john@example.com" }, "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." ] }}