NerdkidChiki
NerdkidChiki15mo ago

how do i redirect a user after signing up or signing in to the current page

i am using clerk to handle authentication in my convex React app. whenever a user signs up or signs in they are redirected to the home page but i want the user to be sent back to the page they were on previously before signing up. I am using the clerk modals to handle this sign up and sign up. How do i go about this? Thanks
12 Replies
天翔
天翔15mo ago
You need to configure Middleware I guess Or config files in convex But not sure bout that
Omar Farooq
Omar Farooq15mo ago
RedirectOptions | Clerk
An interface that provides options for a range of redirect methods.
NerdkidChiki
NerdkidChikiOP15mo ago
Thanks so much for the reply 🙏. I have read the documentation, but i wanna know how i would set that url if i use a modal for signing in and signing out. The user can sign in or sign up on a lotta pages using the pop up modal.How do i set the url to be dynamic depending on the users url
Omar Farooq
Omar Farooq15mo ago
you would set the page they are on as a variable that is passed to clerk
NerdkidChiki
NerdkidChikiOP15mo ago
I am using clerks custom button fro sign in, sign up and sign out, how do i go about this?....cuz i believe i have to set this on my clerk project dashboard
Omar Farooq
Omar Farooq15mo ago
SignInButton | Clerk
The SignInButton component is a button that links to the sign-in page or displays the sign-in modal.
Omar Farooq
Omar Farooq15mo ago
this right?
Omar Farooq
Omar Farooq15mo ago
SignUp | Clerk
The SignUp component renders a UI for signing up users.
Omar Farooq
Omar Farooq15mo ago
@NerdkidChiki Check out this GPT prompt for an example
Omar Farooq
Omar Farooq15mo ago
No description
Omar Farooq
Omar Farooq15mo ago
also not sure if clerk will append your domain settings to the redirectUrl, but if not you'll need to pass an absolute path to them, ie.
No description
NerdkidChiki
NerdkidChikiOP15mo ago
thanks so much...you have been helpful

Did you find this page helpful?