Firebase social login#17
Open
jgenc wants to merge 12 commits into
Open
Conversation
Build frontend Firebase config from GitHub vars and mount Admin SDK credentials through GOOGLE_APPLICATION_CREDENTIALS in local/prod compose.
…cker image versions
Avoid recreating MUI styled components on every render. Dynamic styled() calls inside component bodies create new component types, causing remounts, lost state, and unnecessary render work.
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.
Firebase social login
Summary
Backend changes
local,google,github).Frontend changes
DB migration flow
firebase_uidnullable, for Firebase-linked/social users onlyprovideraccess_revokedfirebase_uidstays nullable because local/password users do not have a Firebase identity.Deployment notes
This PR requires the following additional GitHub Actions secrets before deploying:
FIREBASE_API_KEYFIREBASE_AUTH_DOMAINFIREBASE_PROJECT_IDFIREBASE_STORAGE_BUCKETFIREBASE_MESSAGING_SENDER_IDFIREBASE_APP_IDRegarding Firebase project:
Validation
docker-compose-dev.ymlconfiguration is valid.node:20-alpine.Notes
Additional implementation details
Backend functions added
migrate_schema()get_firebase_project_id()get_firebase_public_certs()verify_firebase_id_token()provider_allows_local_login()build_firebase_username()extract_firebase_provider()provider_list()/provider_matches()/merge_provider()/merge_firebase_provider()/provider_is_local_only()can_link_local_to_firebase_provider()link_local_user_to_firebase_provider()update_firebase_user_metadata()get_or_create_firebase_user()is_local_user()Migration follow-up
Strongly recommended follow-up before relying on this in production long-term:
back-end/requirements.txt, but the project does not currently have an initializedalembic/migration setup.users.firebase_uid,users.provider, andusers.access_revoked.users.firebase_uidnullable, but add a unique nullable index so real Firebase identities cannot be duplicated.migrate_schema()only as a temporary safety net.