Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Firebase Authentication via OpenID Connect

I would like to authenticate users against Firebase Authentication via OpenID Connect. In other words:

  • create a Firebase project
  • add users under authentication
  • get an issuer URL for my project that implements OIDC Discovery
  • get a clientID
  • use the issuer URL and the clientID in my app that acts as an OIDC client to retrieve information / id_token for users in the Firebase Project

The documentation does not mention this possibility, so I'd understand if this was not possible.

However:

  • using OIDC is quite the standard way to do these things
  • there is this and this post that actually tell me this is/was possible
  • the OIDC discovery document they mention is actually available my project too, although it is incomplete (missing the endpoint URLs)
  • digging in the GC dev console it seems like OAuth2 is used internally in the Firebase SDK - newly created service accounts inherit some callback URLs that belong to my Firebase project

Implementing my own IDP using Firebase Auth seems to be an overkill, especially that it might already be available.

Any hints anyone?

like image 720
sfThomas Avatar asked Oct 31 '17 14:10

sfThomas


People also ask

Does Firebase use OIDC?

If you've upgraded to Firebase Authentication with Identity Platform, you can authenticate your users with Firebase using the OpenID Connect (OIDC) compliant provider of your choice.

How to authenticate user Firebase?

To sign a user into your app, you first get authentication credentials from the user. These credentials can be the user's email address and password, or an OAuth token from a federated identity provider. Then, you pass these credentials to the Firebase Authentication SDK.

Is Firebase authentication OAuth?

A Flutter plugin that makes it easy to perform OAuth sign in flows using FirebaseAuth. It also includes support for Sign in by Apple for Firebase. This plugin supports Android, iOS and Web.


1 Answers

Old question but I'm surprised no one has answered this.

With Firebase you have the choice of using the simpler Firebase Auth or the more comprehensive Identity Platform to authenticate your users and Identity Platform does support OIDC authentication.

Here's a comparison of the differences.

Identity Platform just simply needs to be enabled for your project and it will begin authenticating users without changing a line of code. Both services utilize the same Firebase JS SDK for authentication making the transition easy.

The only "downside" is that the Identity Platform isn't free, but does have a very generous free tier.

like image 63
Brian Burton Avatar answered Oct 11 '22 15:10

Brian Burton