Search code examples
firebase-authenticationoktaokta-apigoogle-identitygoogle-identity-toolkit

How to get user data from okta when using it as IdP via GCP Identity Platform?


I've added okta as a SAML provider and as a OIDC provider in GCP Identity Platform (for a firebase project), and from the authentication point of view, everything works great.

When using OIDC, the user's information (displayName, photoUrl, etc.) is automatically filled.

But when using SAML, no user information appears. I've tried setting Attributes and Profile Mappings in okta, but nothing worked. Is there any way to make GCP automatically fill this data by itself?


Solution

  • Identity Platform will populate the IdP claims in the ID token. You can get them from the firebase.sign_in_attributes claim.

    If basic profile is not populated from SAML IdPs, you can always use GCIP APIs to populate these fields. In JavaScript:

    user.updateProfile({displayName: 'name', photoURL: 'photo'});