Skip to main content

Configure social sign-in with Ory Identities

This guide shows you how to configure Ory Identities as a social sign-in provider, allowing users to authenticate using another Ory project.

Understanding ory-to-ory authentication

When setting up Ory OAuth2 as a social provider, you'll work with two separate Ory projects: a provider project that serves as your identity source (similar to how Google works in "Login with Google"), and a consumer project where you add the "Sign in with Ory OAuth2" option for your users.

1. Set up ory oauth2 as a social provider

  1. Go to your Ory project in the Ory Console
  2. Click on Authentication in the main navigation menu
  3. Select Social Sign-In (OIDC) from the sidebar
  4. Enable OpenID Connect by toggling the switch
  5. Click on Add new OpenID Connect provider
  6. Select Ory OAuth2 from the provider list

2. Configure the ory oauth2 provider

Fill in the provider details using the information from your provider project (OAuth2 client setup):

  1. Redirect URI: This is pre-filled and automatically includes a unique callback ID
  2. Label: You can keep "Ory OAuth2" or customize it
  3. Client ID: Enter the OAuth2 client ID from your provider project
  4. Client Secret: Enter the OAuth2 client secret from your provider project
  5. Issuer URL: Enter the base URL of your provider project
    https://your-provider-project-slug.projects.oryapis.com
https://console.ory.sh/projects/<project-id>/social-signin

Configure Ory OAuth2 provider

3. Configure redirect uri in provider project

To avoid redirect errors, you must add the consumer project's callback URL to your provider project:

  1. Go to your provider project in the Ory Console
  2. Navigate to OAuth2 → OAuth2 Clients
  3. Find and edit your OAuth2 client
  4. In the Redirect URIs section, add the exact callback URL shown in your consumer project's configuration:
    https://your-consumer-project-slug.projects.oryapis.com/self-service/methods/oidc/callback/ory-XXXX
  5. Save the changes

What users will see

Once configured, users will see an "Ory OAuth2" option on your login screen:

https://your-project-slug.projects.oryapis.com/ui/login

Login with Ory Account button

When users click this button, they'll be redirected to authenticate with your provider Ory project. After successful authentication, they'll be redirected back to your application with a valid session.