@julian said in Oauth and FusionAuth - undefined callback url:
https://github.com/julianlam/nodebb-plugin-sso-oauth/blob/master/library.js#L187
This gave me an idea...
@KnickKnack in your version of the plugin - can you just print out what the data
value is that is passed into the OAuth.parseUserReturn
?
Looks like you can just un-comment this line:
https://github.com/rgigante/nodebb-plugin-sso-oauth/blob/3781e63994869db1c0f7b6d4bc3eb7ff135ee2a4/library.js#L175
The UserInfo response in OIDC (which is what FusionAuth will be returning) will looks like this:
{
"applicationId": "90c2fca8-d6b3-4af4-9a70-25cfde3f237f",
"email": "[email protected]",
"name" : "John Doe",
"roles": [ "role 1", "role 2" ],
"sub": "6ad9fa59-dee2-475b-861b-43d7cb75b899"
}
This can vary depending upon your user, etc. See more here: UserInfo endpoint
If you're not getting to this point, then the callback is not being handled and it has not yet exchanged the auth code for the token and you're likely failing in the main strategy.
https://github.com/jaredhanson/passport-oauth2/blob/master/lib/strategy.js