Clerk logo

Clerk Docs

Ctrl + K
Go to clerk.dev

<AuthenticateWithRedirectCallback />

Complete a custom OAuth flow

Overview

The <AuthenticateWithRedirectCallback/> is used to complete a custom OAuth flow started by calling either SignIn.authenticateWithRedirect(params) or SignUp.authenticateWithRedirect(params).

Internally, it calls the Clerk.handleRedirectCallback() method

Usage

Make sure you've followed the installation guide for Clerk React before running the snippets below.

The most common scenario for using the <AuthenticateWithRedirectCallback/> component, is to complete a custom OAuth sign in or sign up flow in React and NextJS apps. Simply render the component under the route you passed as redirectUrl to the authenticateWithRedirect methods.

For a more detailed walkthrough, you can check the Social Login (OAuth) guide.

1

Props

NameTypeDescription
afterSignInUrl?string

Full URL or path to navigate after successful sign in.

afterSignUpUrl?string

Full URL or path to navigate after successful sign up.

redirectUrl?string

Full URL or path to navigate after successful sign in or sign up. The same as setting afterSignInUrl and afterSignUpUrl to the same value.

secondFactorUrl?string

Full URL or path to navigate during sign in, if 2FA is enabled.

Was this helpful?

Clerk © 2022