Skip to content
id0n

Social sign-in

Sign users in with third-party providers.

Before you start

Enabled per environment

id0n enables sign-in methods and features for each Legation environment. Ask id0n to turn on what your application needs.

Request fields

Social sign-in redirects the user to a provider, then back to your app.

FieldDescription
providerProvider ID, for example google or github.
callbackURLWhere to send the user after sign-in.
newUserCallbackURLWhere to send users who just signed up.
errorCallbackURLWhere to send the user if sign-in fails.
disableRedirectReturn the provider URL instead of redirecting.
idTokenSign in with a provider ID token instead of a redirect. Supported providers only; see below.

Providers include Apple, Discord, GitHub, GitLab, Google, LinkedIn, Microsoft and Slack, among others. Ask id0n which providers are enabled for your environment and how provider credentials are configured.

Sign in with an ID token

Some providers let your app sign the user in with an ID token it already has, for example from a native sign-in SDK, instead of a redirect. Legation verifies the token before it creates a session. Providers with ID-token verification are Apple, Amazon Cognito, Facebook, Google, LINE and Microsoft Entra ID. Other providers return ID_TOKEN_NOT_SUPPORTED. Whether ID-token sign-in is enabled for a provider is set for your environment.

Errors

ErrorMeaning
PROVIDER_NOT_FOUNDThe provider is not enabled.
ID_TOKEN_NOT_SUPPORTEDThe provider does not support ID-token sign-in.
FAILED_TO_GET_USER_INFOThe provider did not return the user's details.
USER_EMAIL_NOT_FOUNDThe provider did not return an email.

On this page

Ask AI

Answers come from the published id0n docs, with links to their sources.