fix: Use dynamic redirect_uri for staging environment support
Some checks failed
Deploy to Staging / Build Images (push) Successful in 2m32s
Deploy to Staging / Deploy to Staging (push) Failing after 6s
Deploy to Staging / Verify Staging (push) Has been skipped
Deploy to Staging / Notify Staging Ready (push) Has been skipped
Deploy to Staging / Notify Staging Failure (push) Successful in 5s

Changed Auth0 callback URL from hardcoded production domain to
window.location.origin, enabling login flow on staging.motovaultpro.com.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Eric Gullickson
2025-12-30 13:59:46 -06:00
parent 9c0fafddb3
commit a8d98bc607

View File

@@ -39,8 +39,8 @@ export const Auth0Provider: React.FC<Auth0ProviderProps> = ({ children }) => {
domain={domain}
clientId={clientId}
authorizationParams={{
// Production domain; ensure mobile devices resolve this host during testing
redirect_uri: "https://motovaultpro.com/callback",
// Dynamic callback - supports staging (staging.motovaultpro.com) and production (motovaultpro.com)
redirect_uri: `${window.location.origin}/callback`,
audience: audience,
scope: 'openid profile email offline_access',
}}