Skip to content

Integration

Social Login Integration

Configure customer social login by environment, get provider credentials, understand social start/callback fields, and preserve linked identity ownership.

Choose this when

Use this path when your Project needs customer sign-in through external providers such as Google or Apple while keeping the same Lamba User, Project membership, session, and audit model used by password and OIDC flows.

Before you start

Social login is an authentication method, not a separate account system. A provider account links to one global Lamba User, and runtime access still depends on Project membership and Project roles.

Get credentials from Console

Credentials and configuration values
ValueConsole sourceEnv varUsed for
Provider client IDIntegration > Runtime Auth > Social providersPROVIDER_CLIENT_IDProvider OAuth/OIDC app registration for the selected environment
Provider client secretSecretIntegration > Runtime Auth > Social providersPROVIDER_CLIENT_SECRETProvider callback exchange managed by Lamba
Lamba callback URLIntegration > Runtime Auth > Social providersPROVIDER_REDIRECT_URIRedirect URL to register in the provider console
Project and environmentTop Project selector and environment badgeLAMBA_PROJECT_ID and LAMBA_ENVKeeps provider setup isolated by Project and environment

Configure environment variables

Most provider credentials are stored in the Lamba console. Your product usually needs only the auth host and the provider key it wants to start:

LAMBA_CUSTOMER_AUTH_BASE=https://test.id.uselamba.com
LAMBA_SOCIAL_PROVIDER=google

Make the first request

Start login by redirecting to the provider start route for the configured provider.

GEThttps://test.id.uselamba.com/v1/auth/login/social/{provider}/start
Auth
None for the browser redirect
Used for
Starts provider login for the selected Project environment

After the provider completes, Lamba handles the callback and returns the customer into the normal session flow. Read authorization before showing privileged UI:

curl "$LAMBA_CUSTOMER_API_BASE/v1/me/authorization" \
  -H "Authorization: Bearer $CUSTOMER_SESSION_TOKEN"

Request fields

Request and response fields
FieldTypeRequiredMeaningNotes
providerpath stringRequiredSocial provider key, such as `google` or `apple`.-
returnToURIOptionalProduct URL to return to after the social flow completes.Use only trusted product URLs.
statestringConditionalOpaque flow binding value when your client owns state tracking.-

Response fields

Social login ends in the same session contract as other Lamba login methods.

Request and response fields
FieldTypeRequiredMeaningNotes
access_tokenstringRequiredCustomer session access token when the flow completes.-
refresh_tokenstringRequiredRefresh credential for the customer session.-
socialProvidersarrayRequiredProvider connection status returned by `/v1/me/linked-identities`.Use this to show connected/unavailable provider state.

Done when

Done when

  • The provider is enabled only for the intended Project environment.
  • The provider console redirect URL matches the Lamba callback URL.
  • A social login returns a normal Lamba customer session.
  • `/v1/me/linked-identities` shows the provider connection state.
  • Your UI handles provider ownership conflicts without silently reassigning accounts.

Troubleshooting

SymptomLikely causeFix
Provider button is unavailableProvider is disabled or runtime OAuth setup is incompleteReview Integration > Runtime Auth > Social providers for the selected environment
Callback failsProvider redirect URL does not match Lamba's callback URLCopy the exact callback URL into the provider console
User cannot link providerThe same provider subject is already owned by another Lamba UserShow a conflict and ask the user to sign in with the owning account
User signs in but lacks accessSocial login created identity but Project membership is missingAdd or invite the Project member and read /v1/me/authorization
  • OAuth/OIDC Security: /docs/reference/oauth-oidc-security
  • Identity Model: /docs/concepts/identity-model
  • Member Lifecycle: /docs/concepts/member-lifecycle
  • Customer API request and response contract: /docs/quickstart/customer-api