shreyas
shreyas

Reputation: 2620

How to configure google identity platform with CLI sdk?

I am trying to change google identity platform configuration with cli using gcloud CLI SDK for linux.

to be specific I want to call these API getConfig and UpdateConfig

Is there a way to do this using gcloud cli? there seems to be a group called Identity as per the docs, but this does not seem to be doing what I want

Upvotes: 3

Views: 1243

Answers (1)

DazWilkin
DazWilkin

Reputation: 40111

I struggled using Google's Identity Toolkit/Platform and how these correspond with Firebase-Auth too.

The term is overloaded by Google and Cloud Identity, Identity Platform and Firebase Auth have overlapping sets of functionality.

Name URL
Cloud Identity API cloudidentity.googleapis.com
Identity Toolkit API identitytoolkit.googleapis.com

NOTE Identity Toolkit is inaccessible through Google APIs Explorer

I wanted to be able to programmatically update Firebase Auth's authorized domains.

By observing the calls made by Firebase Console, I needed to use getConfig and updateConfig too.

These aren't surfaced through gcloud.

Essentially:

  1. GET the response from getConfig
  2. I used jq to transform it into my desired state
  3. PATCH config1 using an updateMask

1 The endpoint for the updateConfig method is actually (just) config

This worked for me and hopefully helps you better understand how you can use these methods directly.

I blogged about it more comprehensively here

Upvotes: 8

Related Questions