Handle OAuth2 callback (login and identity linking)
GET
/_torii/auth/oauth2/{provider}/callback
const url = 'https://your-app.torii.so/_torii/auth/oauth2/example/callback?state=example';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.torii.so/_torii/auth/oauth2/example/callback?state=example'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
Header Parameters
Section titled “Header Parameters ” User-Agent
string
Responses
Section titled “ Responses ”Found
Media type */*