Handle OAuth2 callback (login and identity linking)
GET
/_torii/auth/oauth2/{provider}/callback
const url = 'https://your-app.toriiauth.eu/_torii/auth/oauth2/example/callback?state=example&_relay=false';const options = {method: 'GET'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://your-app.toriiauth.eu/_torii/auth/oauth2/example/callback?state=example&_relay=false'Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”provider
required
string
Query Parameters
Section titled “Query Parameters”code
string
state
required
string
error
string
error_description
string
_relay
boolean
Header Parameters
Section titled “Header Parameters”User-Agent
string
Responses
Section titled “Responses”Found
Media type*/*
object
Unknown or expired state, or a browser without the state’s binding cookie; both answer the same {error, error_description} body
Media type*/*