As someone new to SSO, I have recently been immersed in a project that utilizes OIDC. My focus has been on using oidc-client to address the issues at hand. Below are my settings (with some details redacted for privacy).
var mgr = new Oidc.UserManager({
userStore: new Oidc.WebStorageStateStore({ store: window.localStorage }),
metadata: {
issuer: 'https://foo.com/',
authorization_endpoint: 'https://foo.com/',
userinfo_endpoint: 'https://foo.com/',
end_session_endpoint: 'https://foo.com/',
jwks_uri: 'https://foo.com/'
},
keys: [
{
'kty': 'RSA',
'kid': 'some info',
'use': 'some info',
'n': 'some info',
'e': 'some info'
}
],
client_id: 'aaaaa',
redirect_uri: 'https://foo.com/',
response_type: 'id_token token',
scope: 'openid'
})
Oidc.Log.logger = console
Oidc.Log.level = Oidc.Log.INFO
mgr.signinRedirect()
.then(function () { console.log('Hello') }).catch(function (err) {
console.log(err)
})
However, I encountered an issue where it did not redirect to the authorization_endpoint as expected. Instead, an error was raised:
oidc-client.min.js?dd17:1 SigninRequest.ctor: No authority passed error @ oidc-client.min.js?dd17:1 SigninRequest @ oidc-client.min.js?dd17:3 (anonymous) @ oidc-client.min.js?dd17:3 Promise.then (async) createSigninRequest @ oidc-client.min.js?dd17:3 (anonymous) @ oidc-client.min.js?dd17:3 Promise.then (async) _signinStart @ oidc-client.min.js?dd17:3 signinRedirect @ oidc-client.min.js?dd17:3 onSubmit @ HelloWorld.vue?140d:71 click @ HelloWorld.vue?1f3f:21 invoker @ vue.runtime.esm.js?2b0e:2023 fn._withTask.fn._withTask @ vue.runtime.esm.js?2b0e:1822
I am working within a vue-cli environment, but I do not believe this is the root cause of the problem. If anyone has faced a similar issue and found a solution, please share your insights. Thank you.