deleteUser not fire USER_DELETED event in onAuthStateChange #3049
See original GitHub issueBug report
Describe the bug
No USER_DELETED
event is fired when a user is deleted.
To Reproduce
Steps to reproduce the behavior, please provide code snippets or a repository:
- Listen to
supabase.auth.onAuthStateChange
- Delete a user.
- No event is triggered
Expected behavior
USER_DELETED
event is fired when a user is deleted.
Additional context
USER_DELETED
exists on AuthChangeEvent
here:
https://github.com/supabase/gotrue-js/blob/a441eef4d7291ec20b756cde99ccee87329594d0/src/lib/types.ts#L34
This a re-activation per https://github.com/supabase/supabase/issues/3049#issuecomment-1312936597
Issue Analytics
- State:
- Created 10 months ago
- Reactions:1
- Comments:14 (11 by maintainers)
Top Results From Across the Web
firebase - Deleting user from Admin API does not trigger ...
EDIT: Deleting the user from the client side does trigger .onAuthStateChanged , so from the client side it does change his/ her auth...
Read more >onAuthStateChanged not triggered when user deleted or ...
I've got my app working with firebase.auth().onAuthStateChanged() and I'm able to create users with emails and passwords and log in as expected.
Read more >Manage Users in Firebase - Google
Create a user. You create a new user in your Firebase project by calling the createUserWithEmailAndPassword method or by signing in a user...
Read more >onAuthStateChanged not working ( new firebase )
Am have just updated to the latest firebase implementation but my onAuthStateChanged event does not fire anymore. I am signing in with custom...
Read more >Using Firebase Authentication - FlutterFire
Once called, the stream provides an immediate event of the user's current ... idTokenChanges() , userChanges() & authStateChanges() will also not fire if ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@j4w8n the
signOut()
method doesn’t have to be called with admin privileges (i.e. the service role key) compared todeleteUser
.Adding
deleteUser
to theGoTrueClient
would be dangerous because it implies that it’s ok to be called on the client-side and users might misuse it by passing theservice_role
key intoGoTrueClient
and callingdeleteUser
from the browser. TheGoTrueAdminApi
class acts as a namespace to warn users that methods inside this class should be called strictly on the server-side with the service role key. IIRC, we kept thesignOut
method inGoTrueAdminApi
to maintain backward compatibility and also to allow those only using the admin api to have a way to sign out their users.yeah @j4w8n i meant emitting 😅