I am having some trouble setting user in case of using PKCE oauth2 flow.
Authorization server returns some JWT token from token endpoint.
/user endpoint is set to false
Now I'm trying to set user in page is specified as redirect.callback in config by parsing JWT:
/pages/auth.vue
<template>
<div />
</template>
<script>
export default {
created () {
this.$auth.setUser({ ...some user object... }) // parsing JWT token from this.$auth.strategy.token.get() and creating user object
}
}
</script>
This part of the code works correctly.
But, afret redirecting to main page $auth.user returns an empty object.
Looks like $auth module is setting user object after executing code part above.
Hello!
I am having some trouble setting user in case of using PKCE oauth2 flow. Authorization server returns some JWT token from token endpoint.
/user endpoint is set to false
Now I'm trying to set user in page is specified as redirect.callback in config by parsing JWT:
/pages/auth.vue
This part of the code works correctly.
But, afret redirecting to main page $auth.user returns an empty object. Looks like $auth module is setting user object after executing code part above.
How to correctly set the user by $auth.setUser()?
Current configuration:
nuxt.config.js
/pages/login.vue