Skip to content
This repository has been archived by the owner on Aug 5, 2024. It is now read-only.

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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants