Notifications Show Save this page to your Developer Profile to get notifications on important updates. Stay organized with collections Save and categorize content based on your preferences.
You can let your users authenticate with Firebase using their Google Accounts. You can either use the Firebase SDK to carry out the Google sign-in flow, or carry out the sign-in flow manually using the Sign In With Google library and passing the resulting ID token to Firebase. Before you beginHandle the sign-in flow with the Firebase SDKIf you are building a web app, the easiest way to authenticate your users with Firebase using their Google Accounts is to handle the sign-in flow with the Firebase JavaScript SDK. (If you want to authenticate a user in Node.js or other non-browser environment, you must handle the sign-in flow manually.) To handle the sign-in flow with the Firebase JavaScript SDK, follow these steps:
Authenticate with Firebase in a Chrome extensionIf you are building a Chrome extension app, you must add your Chrome extension ID:
Only popup operations (signInWithPopup, linkWithPopup, and reauthenticateWithPopup) are available to Chrome extensions, as Chrome extensions cannot use HTTP redirects. You should call these methods from a background page script rather than a browser action popup, as the authentication popup will cancel the browser action popup. The popup methods may only be used in extensions using Manifest V2. The newer Manifest V3 only allows background scripts in the form of service workers, which cannot perform the popup operations at all. In your Chrome extension's manifest file make sure that you add the https://apis.google.com URL to the content_security_policy allowlist. Next stepsAfter a user signs in for the first time, a new user account is created and linked to the credentials—that is, the user name and password, phone number, or auth provider information—the user signed in with. This new account is stored as part of your Firebase project, and can be used to identify a user across every app in your project, regardless of how the user signs in.
You can allow users to sign in to your app using multiple authentication providers by linking auth provider credentials to an existing user account. To sign out a user, call signOut:
|