Conversation
… login - Normalize email addresses to lowercase across registration, login, and Google OAuth to ensure case-insensitive access. - Update `lib/auth.ts` with a fallback mechanism allowing admin login via environment variables even if the user record doesn't exist yet. - Make `GoogleProvider` conditional based on the presence of client ID and secret, preventing OAuth errors when unconfigured. - Update the login page to dynamically render the Google sign-in button only when configured. - Remove hardcoded `NEXTAUTH_URL` default in `scripts/init.js` to allow auto-detection in non-local environments. - Add Google credential placeholders to `scripts/init.js` for better discoverability. Co-authored-by: virtuehearts <17357584+virtuehearts@users.noreply.github.com>
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
This change addresses the issues with admin login and Google OAuth configuration.
Key improvements:
NEXTAUTH_URL="http://localhost:3000"from the initialization script, which was causing incorrect redirects in production/non-local environments. NextAuth will now correctly infer the URL from request headers or rely on environment overrides.scripts/init.jsnow includes placeholders for Google credentials, making it easier for users to know what needs to be configured.Verified with Playwright and tested against the local SQLite database.
PR created automatically by Jules for task 17369478161150935137 started by @virtuehearts