Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CurrentUser not changed when user is updated #6335

Closed
martenw opened this issue Nov 24, 2020 · 4 comments
Closed

CurrentUser not changed when user is updated #6335

martenw opened this issue Nov 24, 2020 · 4 comments

Comments

@martenw
Copy link

martenw commented Nov 24, 2020

Hi

I am having issues with CurrentUser not being updated when the current user is modified. If I for example use the UI to change email of the user the email in ICurrentUser is not refreshed, same issue when setting the users email to confirmed.

Is this by design or is it a bug?

ABP Framework version : 3.3.1

@maliming
Copy link
Member

You can reissue claims according to your authentication scheme. Or you can always get email and other info through the user id,

@martenw
Copy link
Author

martenw commented Nov 25, 2020

Ok, so it is by design? But if ICurrentUser cannot be trusted to have correct data in the default setup does that not limit its use a lot?

If I should modify claims, can I monitor some event or flag to know when ICurrentUser need to be refreshed?

@gdlcf88
Copy link
Contributor

gdlcf88 commented Nov 26, 2020

CurrentUser is a shortcut to get claims.

@martenw
Copy link
Author

martenw commented Nov 26, 2020

That is a better description I guess, I have changed my app now to get user by Id instead of using CurrentUser when I need user information, I guess adjusting this description in docs could help others to not make my mistake:

ICurrentUser is the main service to get info about the current active user.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants