Search code examples
spring-bootoauth-2.0google-oauthgoogle-api-console

How to use an organization domain with google api in our spring boot oauth2 web application?


I tried below code in application.properties file but didn't work

 spring.security.oauth2.client.provider.my-oauth-provider.authorization-  uri=https://accounts.google.com/o/oauth2/auth?hd=domain.com

I refered https://developers.google.com/identity/protocols/OpenIDConnect but couldn't find how to do it


Solution

  • I found a method that is from the google api console we can give application type as internal in oauth consent screen.

    you can see from below image