-
Notifications
You must be signed in to change notification settings - Fork 253
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(remix): Support new redirect urls as environment variables or options to rootAuthLoader #3442
feat(remix): Support new redirect urls as environment variables or options to rootAuthLoader #3442
Conversation
…tions to rootAuthLoader As options - signInForceRedirectUrl - signUpForceRedirectUrl - signInFallbackRedirectUrl - signUpFallbackRedirectUrl As environment variables - CLERK_SIGN_IN_FORCE_REDIRECT_URL - CLERK_SIGN_UP_FORCE_REDIRECT_URL - CLERK_SIGN_IN_FALLBACK_REDIRECT_URL - CLERK_SIGN_UP_FALLBACK_REDIRECT_URL
🦋 Changeset detectedLatest commit: 5753a31 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
const _requestState = await authenticateRequest(args, loadedOptions); | ||
const requestState = { ...loadedOptions, ..._requestState }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❓Should @clerk/backend be aware of these new redirect urls ? Seems like afterXUrl
are being returned as part of the SignedIn/OutState
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❓ Aren't those properties only available in the client? I believe that the only reason the afterXUrl
exist in the backend is for debugging.
@nikosdouvlis Do you have more context?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, i would expect them to only be used in the client as well.
Do you think we should update add the new urls in the request state for usage in debugging as well ? Or is it ok to leave the PR as it is now ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why wouldn't we want them in loadedOptions
? I think we can safely add them - improved debuggability is a welcome side effect
@@ -80,6 +84,10 @@ export function ClerkProvider({ children, ...rest }: ClerkProviderPropsWithState | |||
signUpUrl: __signUpUrl, | |||
afterSignInUrl: __afterSignInUrl, | |||
afterSignUpUrl: __afterSignUpUrl, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❓ Do we still need these or can we mark them as deprecated?
const _requestState = await authenticateRequest(args, loadedOptions); | ||
const requestState = { ...loadedOptions, ..._requestState }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why wouldn't we want them in loadedOptions
? I think we can safely add them - improved debuggability is a welcome side effect
Description
As options
As environment variables
Checklist
npm test
runs as expected.npm run build
runs as expected.Type of change