Reflect Admin dashboard actions in UI #266
-
If I perform an action in the PB Admin dashboard, I'm not sure how to watch for that change via the js-sdk. For example, if I delete a user in the Admin dashboard, my custom app still has a This would be helpful for user onboarding where you want to show different screens based on whether the user has verified their email ( I'm currently using |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
The realtime subscriptions are supported only for the collection records (including the user If your user model has changed or has been deleted after authentication, then there is currently no easy way to get the changes without sending a
If you want your clients to have always an up-to-date state of their user model you could call In future versions, I may consider extending the realtime subscriptions and add support for changes related to the authenticated user model. |
Beta Was this translation helpful? Give feedback.
The realtime subscriptions are supported only for the collection records (including the user
profiles
collection).If your user model has changed or has been deleted after authentication, then there is currently no easy way to get the changes without sending a
refresh()
call (PocketBase is completely stateless and doesn't have sessions, even the tokens are not stored in the db).client.authStore.onChange()
is triggered only when your local data changes (eg. onclient.authStore.clear()
orclient.authStore.save()
, which is called automatically on authentication, refresh, password confirmation, email verification, etc.).If you want your clients to have always an up-to-date state of their us…