perarnborg/vuex-oidc

How to refresh claims from the IP?

Closed this issue · 1 comments

I want to give the authenticated user a hyperlink to the Identity Provider so they can update their user profile (name, email address, etc), then I want to grab the user's updated claims when they return to my app. How do I tell vuex-oidc & oidc-client to clear the locally cached user profile and reload all claims from the IP?

Things I've tried:

  1. getOidcUser. That just reloads the user from the local memory cache.
  2. removeOidcUser followed by getOidcUser. That completely signs out the user and redirects them to the IP to sign in.

In general, what are the best practices an app should follow to allow the user to edit his user profile at the IP? Do I need to do a full sign-out, authenticate cycle when the user returns to my app in order to retrieve the updated claims?

Hello, I am sorry for this late reply.

I would say that my recommendation for this is to do a silent authentication against the IP, this should get the new claims. In the example app this is what happens if you click the button that says Reauthenticate silently (a vuex action called authenticateOidcSilent is dispatched).