Oauth2 - #3
Merged
Merged
Conversation
…ntegration - Added Google OAuth button to the registration page for easier signup. - Improved user feedback during registration and profile loading states. - Updated profile component to handle Google account linking and unlinking. - Enhanced error handling and user notifications for authentication processes. - Refactored API utility functions to include Google account management.
…n handling for Google-only accounts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces comprehensive support for Google OAuth login and account linking, enhances user authentication flows, and updates the database schema to support hybrid authentication methods. The changes also improve error handling, session management, and environment configuration for both local and production deployments.
OAuth and Authentication Enhancements
api/src/controllers/authController.ts[1]api/src/models/user.ts[2]api/src/passport.ts[3]api/src/routes/auth.ts[4]api/src/controllers/authController.tsapi/src/controllers/authController.tsL162-R208)auth_provider,google_id,oauth_connected, andupdated_at. (api/src/models/user.ts[1]api/src/controllers/authController.ts[2]Database Schema Updates
userstable to support nullablepassword_hash, added columns for OAuth (auth_provider,google_id,oauth_connected,updated_at), and included migration logic to handle existing databases gracefully. (api/src/server.tsapi/src/server.tsL63-R142)google_idfor efficient lookups and improved session table initialization with robust error handling for permission issues. (api/src/server.ts[1] [2]Environment and Configuration Improvements
API_URLin environment files and refactored config logic to automatically construct API URLs for different environments. (api/example.env[1]api/src/config.ts[2]api/src/config.tsapi/src/config.tsL19-R33)app/example.envapp/example.envR3-R7)Session and Cookie Management
api/src/controllers/authController.ts[1] [2] [3]api/src/routes/auth.ts[4]api/src/server.ts[5]api/src/server.tsapi/src/server.tsR14-R19)Security and Error Handling
api/src/controllers/authController.ts[1]api/src/server.ts[2] [3]These changes collectively provide robust, flexible authentication and account management for both local and OAuth users, while ensuring smooth migrations and clear error reporting.