Skip to content
GAMPEONCreate
New project

Complete a sign-in with Steam or Discord

POST
/v1/auth/{provider}/callback
curl --request POST \
--url https://api.gampeon.com/v1/auth/steam/callback \
--header 'Content-Type: application/json' \
--data '{ "state": "example", "nonce": "example", "code": "example", "params": { "additionalProperty": "example" } }'

Checks the answer of the provider and then, depending on the mode and on whether the provider account is already connected:

  • result: "login": a session for the connected account.
  • result: "signup": the provider account is not connected yet. Use ticket with POST /v1/auth/signup within 30 minutes. An existing account with the same email address is never connected automatically: log in to it and connect the provider instead.
  • result: "linked": connected to your account (mode link, with the session of the same account).

No access tokens of the provider are stored. Discord tokens are revoked right after reading the user ID.

Not available with access tokens.

Rate limit: 30 per 15 minutes per IP.

provider
required

Sign-in provider

string
Allowed values: steam discord

Sign-in provider: steam or discord

Media typeapplication/json
object
state
required

state from the provider’s redirect

string
/^[A-Za-z0-9_-]{43}$/
nonce
required

Random value (22 to 128 characters A-Z a-z 0-9 _ -) that the client keeps in the browser session and sends again with the callback. Binds the sign-in to the browser that started it.

string
/^[A-Za-z0-9_-]{22,128}$/
code

Discord only: code from the redirect

string
params

Steam only: all openid.* query parameters of the redirect, unchanged

object
key
additional properties
string

Example generated

{
"state": "example",
"nonce": "example",
"code": "example",
"params": {
"additionalProperty": "example"
}
}

Signed in, sign-up needed, or connected

Media typeapplication/json
One of:
object
result
required
Allowed value: login
token
required

Bearer token for the Authorization header

string
expiresAt
required

Unix time in milliseconds

integer format: int64

Example

{
"result": "login"
}

Error codes: invalid_field, invalid_state, invalid_response, cancelled

Media typeapplication/json
object
error
required

Machine-readable error code, for example not_found or rate_limited.

string
message

Human-readable detail. Only present for some errors.

string

Example generated

{
"error": "example",
"message": "example"
}

Error codes: token_not_allowed, email_unverified

Media typeapplication/json
object
error
required

Machine-readable error code, for example not_found or rate_limited.

string
message

Human-readable detail. Only present for some errors.

string

Example generated

{
"error": "example",
"message": "example"
}

Error codes: provider_unavailable

Media typeapplication/json
object
error
required

Machine-readable error code, for example not_found or rate_limited.

string
message

Human-readable detail. Only present for some errors.

string

Example generated

{
"error": "example",
"message": "example"
}

Error codes: identity_taken, already_linked

Media typeapplication/json
object
error
required

Machine-readable error code, for example not_found or rate_limited.

string
message

Human-readable detail. Only present for some errors.

string

Example generated

{
"error": "example",
"message": "example"
}

Limit: 30 per 15 minutes per IP. Error codes: rate_limited

Media typeapplication/json
object
error
required

Machine-readable error code, for example not_found or rate_limited.

string
message

Human-readable detail. Only present for some errors.

string

Example generated

{
"error": "example",
"message": "example"
}

Error codes: provider_error

Media typeapplication/json
object
error
required

Machine-readable error code, for example not_found or rate_limited.

string
message

Human-readable detail. Only present for some errors.

string

Example generated

{
"error": "example",
"message": "example"
}

Report a problem with this pageOther ways to give feedback