-
-
Notifications
You must be signed in to change notification settings - Fork 21
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
fix: dynamic origin handling and updated redirect URLs for environmen… #388
base: dev
Are you sure you want to change the base?
fix: dynamic origin handling and updated redirect URLs for environmen… #388
Conversation
👷 Deploy request for cool-creponne-3e1272 pending review.Visit the deploys page to approve it
|
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.
I have a theory that this needs to be sorted with some tweaks in supabase but I no longer have access because I'm not logged in with my old email account. Can someone reach out on discord and give me access on my personal email?
removed redundant logic for setting the origin value based on NODE_ENV and NEXT_PUBLIC_SITE_URL Replaced with a simplified implementation: const headerData = await headers(); const origin = headerData.get('origin') The previous fallback logic was unnecessary since the origin header is reliably retrieved using the headers() function in most environments.
The console.log("Origin", origin) confirms that the origin value is fetched correctly during my tests, and no errors (e.g., null or unexpected results) occur. This makes me believe that the production deployment should work as expected, provided the server environment properly sets the origin header. |
…RL-deployed-environment
Checklist:
Description
**Relates #385 OR Closes #385 **
Instead of defaulting to http://localhost:3000/, the reset password email link should dynamically generate the correct URL based on the environment.
In the deployed version, the reset password email link should point to the actual domain of the website (e.g., https://your-deployed-domain.com/login/reset-password) instead of the localhost URL.
Code Update:
Configuration Update:
Updated config.toml to include additional production redirect URLs
"https://**cool-creponne-3e1272.netlify.app/**", "https://cool-creponne-3e1272.netlify.app/login/reset-password"
to ensure Supabase accepts them, preventing failed password reset flows due to unlisted URLs.(Supabase Docs)
Files changed
UI changes
no UI changes
Changes to Documentation
No changes needed.
Tests
All previous tests passed during local development.