Configuring OAuth2 for your website
1. Google OAuth 2.0 Setup
- Go to the Google Cloud Console.
- Create a new project or select an existing one.
- Navigate to APIs & Services > Credentials.
- Click Create Credentials > OAuth client ID.
- Select Web application as the Application type.
- Under Authorized redirect URIs, add the Redirect URL shown on this page:
- Click Create and copy your Client ID and Client Secret.
2. Microsoft (Azure AD) Setup
- Sign in to the Azure Portal.
- Search for and select App registrations.
- Click New registration.
- Enter a name and select Accounts in any organizational directory (Any Microsoft Entra ID tenant - Multitenant).
- Under Redirect URI, select Web and paste the Redirect URL from this page.
- After registering, copy the Application (client) ID.
- Navigate to Certificates & secrets > New client secret, then copy the secret Value.
Field Definitions
- Client ID & Client Secret: Unique credentials assigned to your app by the provider.
- Auth URL: Where users go to sign in (usually pre-filled for Google/Microsoft).
- Token URL: Used behind the scenes to exchange codes for access (usually pre-filled).
- User Info URL: Endpoint to fetch user details like email/name (usually pre-filled).
- Redirect URL: The destination URL after login. Must exactly match your provider settings.