-
Notifications
You must be signed in to change notification settings - Fork 22
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
Auth user state update #149
Comments
I've managed to get it working using cloning:
Interestingly, cloning doesn't seem to work as expected when using SSR (so I've had to disable SSR for this page).
Is this expected behavior? |
I've not thought of a requirement for using clone during an SSR load. Are you doing full-blown SSR with no client-side JS? |
If you look here, So the only way that user wouldn't be updating is if something has broken reactivity or created a copy of the data instead of having a reference to the original computed. |
This should be a guaranteed workaround if you're unable to find what's breaking reactivity: const { api } = useFeathers()
const auth = useAuthStore() // (or whatever you called the composable, if not useAuthStore)
const user = api.service('users').getFromStore(auth.userId)
|
Hi
I'm a little confused and unsure if this is supposed to work or not.
I've setup everything as in the basic example setup.
The user is currently logged in, and thus I have a user:
I then update the user profile using:
As I understand it, the auth service is aware of the user model, and thus updating a user model should also update the user model in the auth service, or am I mistaken?
I've also tried:
The auth.user is still not updated with the changes made.
What am I missing, any help would be appreciated!
The text was updated successfully, but these errors were encountered: