Search code examples
google-cloud-platformomniauthomniauth-google-oauth2

Adding more than one organisation domain on GCP


I am using omniauth-google-oauth2 gem in Rails. I have created account on GCP & created project under organisation example.com

The problem is when I created app on GCP and created omni-oauth client-id & client-secret-key, I did setting under, 'Oauth Consent Screen'

  • Public - Any Google Account can grant access to the scopes required by this app.

  • Internal - Only users with a Google Account in your organization can grant access to the scopes requested by this app.

I chose internal & now only emails having domain example.com can access & example.in cannot. I want to do setup for .in domain also.


Solution

  • To add another domain follow these steps:

    1. Go to the Google Cloud Console.
    2. Go to APIs & Services -> Credentials.
    3. Select the tab OAuth consent screen.
    4. Under Application domains notice the text box with example.com.
    5. Enter the next domain name and press ENTER.
    6. Click Save.