NerdkidChiki
NerdkidChiki2y 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
赛博鸭
赛博鸭2y ago
You need to configure Middleware I guess Or config files in convex But not sure bout that
Omar
Omar2y ago
RedirectOptions | Clerk
An interface that provides options for a range of redirect methods.
NerdkidChiki
NerdkidChikiOP2y 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
Omar2y ago
you would set the page they are on as a variable that is passed to clerk
NerdkidChiki
NerdkidChikiOP2y 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
Omar2y ago
SignInButton | Clerk
The SignInButton component is a button that links to the sign-in page or displays the sign-in modal.
Omar
Omar2y ago
this right?
Omar
Omar2y ago
SignUp | Clerk
The SignUp component renders a UI for signing up users.
Omar
Omar2y ago
@NerdkidChiki Check out this GPT prompt for an example
Omar
Omar2y ago
No description
Omar
Omar2y 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
NerdkidChikiOP2y ago
thanks so much...you have been helpful

Did you find this page helpful?