I am trying to use the new oAuth 2.0 plugin for Grails to consume LinkedIn resources. With my code, I am able to get to LinkedIn authorization page where I can grant my app permission to access my LinkedIn account info.
The problem is that once I hit the continue button, it does not redirect back to my app. instead, it goes to a page that says "You have successfully authorized XXXX. Please return to your application and enter the following security code to grant access: some number"
How do I get this to redirect back to my app?
My settings are:
Config.groovy
oauth {
providers{
linkedin {
api="org.scribe.builder.api.LinkedInApi"
key = 'my key'
secret = 'my secret'
successUri = '/linkedinProfile/success'
failureUri = '/linkedinProfile/failed'
callback = "http://localhost:8080/myApp/secure/linkedinProfile/success"
}
}
}
my gsp view:
<oauth:connect provider="linkedin">Connect to linkedin</oauth:connect>
my linked in developer account:
Website URL: http://localhost:8080/myApp
OAuth Redirect URL: http://localhost:8080/myApp/secure/linkedinProfile/success