Callback from a strategy
Callback from a strategy. This is the endpoint where the strategy will redirect the user after successful authentication. This endpoint will be called with the code and state query parameters. The code will be used to get the access token from the strategy and the state will be used to get the return_to url from the session and redirect the user to that url.
application/json
Request Body required
strategy_name strategy_name will not be set for oidc but can be utilized for methods like email magic links
state for oidc & magic links
code string
state_options object
Responses
- 200
- 400
- 401
- 403
- 404
- 500
- default
A successful response.
application/json
Schema
Example (from schema)
Schema
object
{}
Bad Request - The request was malformed or contained invalid parameters.
application/json
Schema
Example (from schema)
Schema
code int32
message string
details object[]
{
"code": 0,
"message": "string",
"details": [
{
"@type": "string"
}
]
}
Unauthorized - Authentication is required
application/json
Schema
Example (from schema)
Schema
code int32
message string
details object[]
{
"code": 0,
"message": "string",
"details": [
{
"@type": "string"
}
]
}
Forbidden - User does not have permission to access the resource
application/json
Schema
Example (from schema)
Schema
code int32
message string
details object[]
{
"code": 0,
"message": "string",
"details": [
{
"@type": "string"
}
]
}
Not Found - The requested resource was not found
application/json
Schema
Example (from schema)
Schema
code int32
message string
details object[]
{
"code": 0,
"message": "string",
"details": [
{
"@type": "string"
}
]
}
Internal Server Error. Returned when theres is something wrong with Frontier server.
application/json
Schema
Example (from schema)
Schema
code int32
message string
details object[]
{
"code": 0,
"message": "string",
"details": [
{
"@type": "string"
}
]
}
An unexpected error response.
application/json
Schema
Example (from schema)
Schema
code int32
message string
details object[]
{
"code": 0,
"message": "string",
"details": [
{
"@type": "string"
}
]
}
POST /v1beta1/auth/callback
Authorization
name: Basic type: httpdescription: use Client ID as username and Client Secret as passwordin: headerscheme: basic
Request
Request
curl / cURL
curl -L -X POST 'http://127.0.0.1:7400/v1beta1/auth/callback' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
--data-raw '{
"strategy_name": "string",
"state": "string",
"code": "string",
"state_options": {}
}'
python / requests
curl -L -X POST 'http://127.0.0.1:7400/v1beta1/auth/callback' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
--data-raw '{
"strategy_name": "string",
"state": "string",
"code": "string",
"state_options": {}
}'
go / native
curl -L -X POST 'http://127.0.0.1:7400/v1beta1/auth/callback' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
--data-raw '{
"strategy_name": "string",
"state": "string",
"code": "string",
"state_options": {}
}'
nodejs / axios
curl -L -X POST 'http://127.0.0.1:7400/v1beta1/auth/callback' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
--data-raw '{
"strategy_name": "string",
"state": "string",
"code": "string",
"state_options": {}
}'
ruby / Net::HTTP
curl -L -X POST 'http://127.0.0.1:7400/v1beta1/auth/callback' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
--data-raw '{
"strategy_name": "string",
"state": "string",
"code": "string",
"state_options": {}
}'
csharp / RestSharp
curl -L -X POST 'http://127.0.0.1:7400/v1beta1/auth/callback' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
--data-raw '{
"strategy_name": "string",
"state": "string",
"code": "string",
"state_options": {}
}'
php / cURL
curl -L -X POST 'http://127.0.0.1:7400/v1beta1/auth/callback' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
--data-raw '{
"strategy_name": "string",
"state": "string",
"code": "string",
"state_options": {}
}'
java / OkHttp
curl -L -X POST 'http://127.0.0.1:7400/v1beta1/auth/callback' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
--data-raw '{
"strategy_name": "string",
"state": "string",
"code": "string",
"state_options": {}
}'
powershell / RestMethod
curl -L -X POST 'http://127.0.0.1:7400/v1beta1/auth/callback' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
--data-raw '{
"strategy_name": "string",
"state": "string",
"code": "string",
"state_options": {}
}'