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

Refresh user #28

Open
cvalues opened this issue Jun 19, 2023 · 4 comments
Open

Refresh user #28

cvalues opened this issue Jun 19, 2023 · 4 comments

Comments

@cvalues
Copy link

cvalues commented Jun 19, 2023

Hi,

how to refresh the user?
To call "await $sanctumAuth.getUser()" again, seems not to make an api call?

KR

@kreejzak
Copy link
Collaborator

Hi, only option to refetch user right now is window.location.reload().

@cvalues
Copy link
Author

cvalues commented Jun 22, 2023

Hi,

my solution now, i change the user data diretyl in the auth.user object after server response.

@kreejzak
Copy link
Collaborator

yes, you could do that too, but there is a slight chance that the data would deviate from the source. I so would still recommend refreshing the app after changing user data.

@cvalues
Copy link
Author

cvalues commented Jun 22, 2023

yeah i know, but i want to avoit a reload in a spa.

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

2 participants