Search code examples
firebase-authenticationazure-active-directorysingle-sign-ongoogle-cloud-identitygoogle-sso

How to Authenticate users in Azure AD to a custom web app deployed in Google cloud run?


I have experience in integrating AWS cognito with Azure AD (SSO). But I don't know how to implement similar authentication in GCP.

I want to authenticate the users in Azure AD to use the custom web app deployed in Google cloud run.

I see three options in GCP, but I couldn't find any resource to implement.

  1. Google cloud identity
  2. Google cloud identity platform
  3. Firebase Authentication

This custom web app should only authenticate the Azure AD users in our organization.


Solution

  • Google Cloud Identity Platform and Firebase Authentication are effectively the same thing. There are a few additional features in GCIP.

    To set up GCIP for Microsoft user, here's a link to the docs.

    If you're using Cloud Function for Firebase, you can use a Callable Function to get the authenticated user, then handle your own authorisation.

    If you want to use Cloud Run, then you can use the Firebase Admin SDK (even with GCIP) to verify the token and get the user ID (which you can then use to authorise the user via a database or with Custom Claims).