Finish an OAuth or OIDC login
const url = 'http://localhost:8080/api/auth/callback/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 http://localhost:8080/api/auth/callback/exampleClears the login cookie. Success sets the session cookie and redirects to the saved relative path. Failure redirects to /login?error=<code>. Codes: invalid_state, provider_error, provider_unavailable, email_not_verified, domain_not_allowed, signup_closed, account_disabled, link_refused, setup_required, seat_limit, sso_unavailable, sso_required, saml_invalid, saml_unsupported. The provider is github, google, oidc:<name>, or sso (an org’s provider, started through /api/auth/sso/authorize).
Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Provider id: github, google, or oidc:<name>.
Query Parameters
Section titled “Query Parameters”Authorization code from the provider.
State value from the authorization redirect.
Error code from the provider, when it refused the login.
Responses
Section titled “Responses”Redirect to the saved path, or to /login?error=<code> (invalid_state, provider_error, provider_unavailable, email_not_verified, domain_not_allowed, signup_closed, account_disabled, link_refused, setup_required).