https://github.com/grails-plugins/grails-spring-security-oauth2-google/blob/master/grails-app/services/grails/plugin/springsecurity/oauth2/google/GoogleOAuth2Service.groovy may guide you in the right direction.