OAuth Authentication

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

To set up configurations to enable social login, see the Signer Quickstart to enable a social policy in the dashboard.

Authenticate a user

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