If you would like to give your users a better experience, add a way for them to authenticate if they originally purchased from Whop. First, you will need to send your users to the Whop OAuth Portal. You can do this by having the user click a login button, which might look something like this:
Copy
Ask AI
<a href={`https://whop.com/oauth?client_id=${process.env.CLIENT_ID}&redirect_uri=${process.env.REDIRECT_URI}`}> <button>Login with Whop</button></a>
After the user has signed in, they will be redirected to the URL you specified in the redirect_uri query parameter. The URL will also contain a code query parameter, which you can use to get the user’s access token.
To learn how to setup a callback URL, follow this
guide
Was this page helpful?
Assistant
Responses are generated using AI and may contain mistakes.