Skip to content

Social Login Authentication

Social login authentication allows you to login and signup users using an OAuth provider, such as Google Sign-In or Facebook Login. You can also configure custom providers through Auth0.

Authenticate a user

example.ts
import { signer } from "./signer";
 
await signer.authenticate({
  type: "oauth",
  authProviderId: "google", // Choose between the auth providers you selected to support from your auth policy
  mode: "redirect", // Alternatively, you can choose "popup" mode
  redirectUrl: "/", // After logging in, redirect to the index page
});