There is currently an issue that when using the OneLogin authentication with Passport, it will return a 404 error because Passport is failing to exchange any information between OneLogin and Loopback. This is happening because OneLogin will get an authorization code but it will fail to actually get a token from OneLogin. Here are the contents of our providers.js file which is required for third-party login which in this case is OneLogin. Here are the contents:
It seems that there is very little documentation/support on how to setup OneLogin with Passport so it's difficult to know whether or not we are taking the correct approach. If anyone has any suggestions on how to get around this issue, please let me know. Thanks.
There is currently an issue that when using the OneLogin authentication with Passport, it will return a 404 error because Passport is failing to exchange any information between OneLogin and Loopback. This is happening because OneLogin will get an authorization code but it will fail to actually get a token from OneLogin. Here are the contents of our providers.js file which is required for third-party login which in this case is OneLogin. Here are the contents:
Providers.js (file contents) 'use strict';
module.exports = { 'openid': { 'provider': 'openid', 'module': 'passport-openidconnect', 'issuer': 'https://openid-connect.onelogin.com/oidc', 'session': 'true', 'clientID': process.env.ONELOGIN_ID, 'clientSecret': process.env.ONELOGIN_SECRET, 'grant_type': 'authorization_code', 'callbackURL': process.env.ONELOGIN_ROOT + '/oauth/callback', 'authorizationURL': 'https://openid-connect.onelogin.com/oidc/auth', 'tokenURL': 'https://openid-connect.onelogin.com/oidc/token', 'userInfoURL': 'https://openid-connect.onelogin.com/oidc/me', 'scope': 'auth_web openid profile email', 'authPath': '/auth/openid', 'callbackPath': '/auth/openid/callback', 'successRedirect': '/auth/account', 'failureRedirect': '/login', 'failureFlash': true, }, };
It seems that there is very little documentation/support on how to setup OneLogin with Passport so it's difficult to know whether or not we are taking the correct approach. If anyone has any suggestions on how to get around this issue, please let me know. Thanks.