Search code examples
grailsoauthscreengoogle-oauthconfirmation

Google consent screen not shown as expected


I have registered a web application at cloud.google.com. "The OAuth 2.0 Client ID" looks like this: enter image description here

I am using grails and the grails oauth plugin. In Config.groovy I added the follwoing snippet:

google {
    api = GoogleApi
    key = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.apps.googleusercontent.com'
    secret = 'yyyyyyyyyyyyyyyyyyyyyyyy'

    scope = 'https://www.googleapis.com/auth/userinfo.profile'

    callback = "http://localhost:8080/grailsOauthPluginDemo/oauth/google/callback"
    successUri = "http://localhost:8080/grailsOauthPluginDemo/oauthCallBack/google"
    failureUri = "http://localhost:8080/grailsOauthPluginDemo/oauthCallBack/failure"
}

and the following into index.gsp

<oauth:connect provider="google">Google</oauth:connect><br/>

I am logged in with my personal google account. I am using the https://github.com/manishkbharti/grailsOauthPluginDemo and when clicking the Google link I get to the consent page which looks like this: enter image description here

I was expecting to get a page looking something like the following with my applications name. I know that I have to add a picture but the applications name should popup. enter image description here


Solution

  • I believe that the grailsOauthPluginDemo is using Google's OAuth1.0a API which currently uses different templates for the consent page.

    Hope that helps!