OAuth Provider Configuration

Set up OAuth providers for social login including Google, GitHub, and Microsoft

OAuth Provider Setup

Integrate popular OAuth providers to enable social login in your applications.

Google OAuth Setup

  1. Create project in Google Cloud Console
  2. Configure OAuth consent screen
  3. Create credentials
const googleConfig = {
  clientId: 'your-client-id.apps.googleusercontent.com',
  clientSecret: 'your-client-secret',
  scopes: ['email', 'profile'],
  callbackUrl: 'https://your-app.com/callback/google'
};

GitHub OAuth Setup

const githubConfig = {
  clientId: 'Iv1.xxx',
  clientSecret: 'xxx',
  scopes: ['user:email', 'read:user'],
  callbackUrl: 'https://your-app.com/callback/github'
};

Microsoft OAuth Setup

const microsoftConfig = {
  clientId: 'your-app-id',
  clientSecret: 'your-secret',
  tenant: 'common',
  scopes: ['User.Read', 'email'],
  callbackUrl: 'https://your-app.com/callback/microsoft'
};

Implementation

auth.configure({
  providers: {
    google: googleConfig,
    github: githubConfig,
    microsoft: microsoftConfig
  }
});

For custom OAuth providers, see our advanced integration guide.