Skip to content
This repository has been archived by the owner on Mar 3, 2022. It is now read-only.

Make UserManager.storeUser public #416

Closed
nzdjigit opened this issue Sep 12, 2017 · 4 comments
Closed

Make UserManager.storeUser public #416

nzdjigit opened this issue Sep 12, 2017 · 4 comments
Milestone

Comments

@nzdjigit
Copy link

Hi,

We have an unusual scenario, so we're hoping someone could help us out.

We have an Angular 2 SPA app that gets authenticated against Azure AD. This returns to us an id_token, which we then use to hit our own API to generate an access_token with all the roles and expiration times in it. We call our API inside the signInRedirectCallback method after we acquire an id_token from Azure AD.

So far this flow works, the only thing we can't seem to be able to do is to update the current user details stored in the local storage with additional profile info and token expiration times. The oidc.user object in the local storage gets set just before it reaches the signInRedirectCallback method and we don't know how to override it with the new user object with additional details.

Could anyone please advise on how this could possibly be achieved?

Thanks

@brockallen
Copy link
Member

That's not something that is supported, as it wasn't a use case that we designed for.

@nzdjigit
Copy link
Author

Thanks Brock. That sure sucks!

Would it not be as simple as exposing the setUser function alongside the getUser function? That would solve this problem.

@brockallen
Copy link
Member

Possibly. I could consider what's involved.

@brockallen brockallen added this to the 1.4.0 milestone Sep 23, 2017
@brockallen brockallen changed the title Updating User data manually after sign-in Make UserManager.storeUser public Sep 23, 2017
@brockallen
Copy link
Member

I made it public, but use at your own risk (and then report back how it works for you) :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Development

No branches or pull requests

2 participants