Comments (14)
Is there a workaround for this? I am unable to launch my app since once the user completes their sign up using the SignUpButton on the homepage, they are not taken to my onboarding flow.
I'm using the signup button like so:
<SignUpButton signInForceRedirectUrl={"/dashboard/alerts"} forceRedirectUrl={"/dashboard/alerts"}>
<Button>
Get Started<FaChevronRight className="ml-2"></FaChevronRight>
</Button>
</SignUpButton>
But when I click the button I'm taken to https://funny-mite-97.accounts.dev/sign-up?redirect_url=http%3A%2F%2Flocalhost%3A3000%2F
I've also noticed that
clerk.buildSignUpUrl({
signUpForceRedirectUrl: "/dashboard/alerts",
})
doesn't build the right url. It gives me https://funny-mite-97.accounts.dev/sign-up?__clerk_db_jwt=eyJhb....#/?redirect_url=http%3A%2F%2Flocalhost%3A3000%2F
from javascript.
+1 here.
from javascript.
Hello everyone, props passed to the SignUpButton
button were not supposed to be transferred to Account Portal. That being said, we've received reports from users finding this behavior confusing so we're discussing internally about potential solutions for this one.
I will have an update for you within the day, thank you!
from javascript.
+1
from javascript.
I will have an update for you within the day, thank you!
@nikosdouvlis any updates here?
Just to clarify -- the issue is that forceRedirectUrl
and signInForceRedirectUrl
in SignUpButton
and SignInButton
are simply ignored. Instead, the user gets redirected to the default redirect_url
. This prevents one from sending the user to an onboarding flow or a checkout flow.
I tried side-stepping the issue through the corresponding environment variables and that didn't work either.
from javascript.
I was able to use this as temporary workaround. But its not ideal:
const SignUpButton = ({ className }: SignUpButtonProps) => {
const clerk = useClerk()
return (
<Button className={className} onClick={()=>{clerk.redirectToSignUp({
redirectUrl: `${window.location.origin}/dashboard/alerts`,
})}}>
Get Started<FaChevronRight className="ml-2" />
</Button>
);
}
from javascript.
This has been fixed with #3361 and was released in @clerk/[email protected]
from javascript.
Hi! I'm still facing the same issue (I'm using the latest release, @clerk/nextjs 5.0.10).
from javascript.
This issue only happens when I have a custom sign up/sign in page
from javascript.
@Chenalejandro could you provide a minimal reproduction so we can investigate? Thanks!
from javascript.
@BRKalow
Here are the steps to reproduce
- clone the basic create-next-app with clerk integrated: https://github.com/Chenalejandro/clerk-bug
my .env.local env values:
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=pk_test_ZGVsaWNhdGUtbW9yYXktNS5jbGVyay5hY2NvdW50cy5kZXYk
# Put your clerk secret key here:
CLERK_SECRET_KEY=sk_test_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
NEXT_PUBLIC_CLERK_SIGN_IN_URL=/sign-in
NEXT_PUBLIC_CLERK_SIGN_UP_URL=/sign-up
- npm run dev
- go to localhost:3000/test
- click the SECOND sign-in button in the page (The first sign-in button is generated from the layout page).
- login with credentials
Expected: redirected to the /test page, since we had forced it by adding forceRedirectUrl prop:
<SignInButton
signUpForceRedirectUrl="/test"
forceRedirectUrl="/test"
>
Actual: redirected to the root page
The same happends when signing up
I noticed that when clicking the SECOND sign-in button in /test, it redirected me to the /sign-in page with the following url parameters:
http://localhost:3000/sign-in?sign_up_force_redirect_url=http%3A%2F%2Flocalhost%3A3000%2Ftest&sign_in_force_redirect_url=http%3A%2F%2Flocalhost%3A3000%2Ftest&redirect_url=http%3A%2F%2Flocalhost%3A3000%2Ftest
If I remove &redirect_url=http%3A%2F%2Flocalhost%3A3000%2Ftest
and just use this url http://localhost:3000/sign-in?sign_up_force_redirect_url=http%3A%2F%2Flocalhost%3A3000%2Ftest&sign_in_force_redirect_url=http%3A%2F%2Flocalhost%3A3000%2Ftest, then I was redirected correctly to the /test page.
from javascript.
@LekoArts please reopen. I'm still facing this issue. Please see my latest comments here: https://discord.com/channels/856971667393609759/1236251832763023420
from javascript.
I'm having the same issue using the JS library directly {{ CLERK_FRONTEND_API_URL }}/npm/@clerk/clerk-js@5/dist/clerk.browser.js
.
from javascript.
@spacecat Please provide a new reproduction if the old one with updated dependencies isn't showing your issue. On our end your reproduction with the fix worked.
from javascript.
Related Issues (20)
- Incorrect Return Type for getAllowlistIdentifierList HOT 3
- Cannot remove divider above Privacy and Terms links in core-2 HOT 3
- Unable to Access users Property in Clerk SDK for Node.js v5.0.2 HOT 1
- `@clerk/nextjs` middleware redirection issue on login with email on chrome HOT 16
- [Node SDK]: Failed to resolve JWK during verification HOT 6
- Home Page not auto-redirecting to clerk auth page on localhost in "@clerk/nextjs": "^5.0.3" HOT 2
- `@clerk/upgrade` does not seem to work via yarn HOT 3
- Unable to add custom header when calling "isProtectedRoute". HOT 4
- Too many redirects on clerk.com (Dashboard AND docs) HOT 1
- React Native @clerk/clerk-expo is not working as expected HOT 20
- Sign out not working reliably in @clerk/nextjs v5 HOT 2
- [Next App Router] i18n not work on `clerkMiddleware` HOT 6
- I upgraded my app from version Expo SDK 50 to 51 and since then clerk has completely broken HOT 7
- Clerk core v2 - Clerk fails to load under cypress iframe - "Browser unauthenticated" HOT 3
- Flaky userId/sessionId on the client side after logging in
- Dependency Dashboard
- Fastify plugin doesn't run before request validation HOT 1
- Unable to disable redirect when using custom signout flow
- @clerk/remix v4.0.12 RequestInit: duplex option is required when sending a body. HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from javascript.