Closed Bogatinovski closed 5 years ago
@Bogatinovski Is your backend configured to send this profile?
Yes it is configured. Actually i am using exactly the same backend for the plain javascript oidc client and that one works properly. But this quasar wrapper doesn't work. Note that the quasar wrapper actually reports successful authentication after the redirect and the success callback is executed, but the passed user parameter is undefined. That is so weird.
I found the problem. First I updated the version of the oidc library to the current latest one (1.6.1). I am not sure if this played any role in fixing the issue. But then in the callback function I chanced the code from the default one in this repo to the following:
new Oidc.UserManager({response_mode:"query"}).signinRedirectCallback().then(function(data) { window.location.href = process.env.REDIRECT_CALLBACK }).catch(function(e) { console.error(e); });
The key change here is instantiating new Oidc.UserManager
and the addition of {response_mode:"query"}
.
@Bogatinovski In my project it works as follows, inside callback.vue do:
And in my App.vue I do:
In quasar.conf.js
For me it worked correctly, did you make it very different from me?
I'm closing if the problem persists I'll reopen.
Upon successful log in the user profile is empty object. Here is my quasar configuration: `OIDC_AUTHORITY: JSON.stringify('http://localhost:5003'),
Here is the response for the user data and as you can see the profile is empty. If I run the plain javascript oidc-client it works as expected. Am I missing some configuration?
{ session_state: "bQs03c1xDwP8xMKcoH4aJk989ujBAQjZfCQRKLTiE9I.63a4ff2e459b4b1cd8d89bc4956cf145",…} profile: {} scope: "openid profile" session_state: "bQs03c1xDwP8xMKcoH4aJk989ujBAQjZfCQRKLTiE9I.63a4ff2e459b4b1cd8d89bc4956cf145"