@julian said in Oauth and FusionAuth - undefined callback url:
nodebb-plugin-sso-oauth/library.js at master · julianlam/nodebb-plugin-sso-oauth
NodeBB Plugin that allows users to login/register via any configured OAuth provider. - nodebb-plugin-sso-oauth/library.js at master · julianlam/nodebb-plugin-sso-oauth
GitHub (github.com)
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.
passport-oauth2/lib/strategy.js at master · jaredhanson/passport-oauth2
OAuth 2.0 authentication strategy for Passport and Node.js. - passport-oauth2/lib/strategy.js at master · jaredhanson/passport-oauth2
GitHub (github.com)