Skip to content

Finish a native sign-in

POST
/api/v1/auth/native-sessions
curl --request POST \
--url http://127.0.0.1:8080/api/v1/auth/native-sessions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Origin: example' \
--data '{ "code": "example", "code_verifier": "example", "redirect_uri": "example" }'

Available only when account authentication is enabled. Provider configuration is restart-bound. Local logout does not require an external provider. Responses must not be cached.

Origin
required
string
Media typeapplication/json
object
code
required

The one-time code from the return target. It expires after one minute and is consumed by the first attempt.

string
code_verifier
required

The PKCE verifier: 43 to 128 unreserved characters.

string
redirect_uri
required

The return target used to begin the sign-in.

string
Examplegenerated
{
"code": "example",
"code_verifier": "example",
"redirect_uri": "example"
}

The one-time code and its PKCE verifier are exchanged for an ordinary session, returned in the instance’s session cookie. A presented earlier session is revoked.

Media typeapplication/json
object
csrf_token
required
string
invitation_accepted
required
boolean
user
required
object
display_name
required
string
id
required
string
instance_admin
required
boolean
key
additional properties
any
Examplegenerated
{
"csrf_token": "example",
"invitation_accepted": true,
"user": {
"display_name": "example",
"id": "example",
"instance_admin": true
}
}

Structured authentication boundary failure

Media typeapplication/problem+json
object
code
required
string
detail
required
string
status
required
integer
title
required
string
type
required
string
Examplegenerated
{
"code": "example",
"detail": "example",
"status": 1,
"title": "example",
"type": "example"
}

Structured authentication boundary failure

Media typeapplication/problem+json
object
code
required
string
detail
required
string
status
required
integer
title
required
string
type
required
string
Examplegenerated
{
"code": "example",
"detail": "example",
"status": 1,
"title": "example",
"type": "example"
}

Structured authentication boundary failure

Media typeapplication/problem+json
object
code
required
string
detail
required
string
status
required
integer
title
required
string
type
required
string
Examplegenerated
{
"code": "example",
"detail": "example",
"status": 1,
"title": "example",
"type": "example"
}

Structured authentication boundary failure

Media typeapplication/problem+json
object
code
required
string
detail
required
string
status
required
integer
title
required
string
type
required
string
Examplegenerated
{
"code": "example",
"detail": "example",
"status": 1,
"title": "example",
"type": "example"
}

Structured authentication boundary failure

Media typeapplication/problem+json
object
code
required
string
detail
required
string
status
required
integer
title
required
string
type
required
string
Examplegenerated
{
"code": "example",
"detail": "example",
"status": 1,
"title": "example",
"type": "example"
}