Mutation is not called when logout
See original GitHub issueauth: {
initialize: {
onSuccessMutation: 'ON_SUCCESS_MUTATION',
onSuccessAction: null,
onErrorMutation: null,
onErrorAction: 'onErrorAction',
ssr: false // default
}
}
ON_SUCCESS_MUTATION is called only when the user log in. Do should be called when log out?
firebase.auth().onAuthStateChanged(function(user) {
if (user) {
// User is signed in.
var displayName = user.displayName;
var email = user.email;
var emailVerified = user.emailVerified;
var photoURL = user.photoURL;
var isAnonymous = user.isAnonymous;
var uid = user.uid;
var providerData = user.providerData;
// ...
} else {
// User is signed out.
// ...
}
});
Issue Analytics
- State:
- Created 4 years ago
- Comments:8 (3 by maintainers)
Top Results From Across the Web
React query useMutation error: onLogout is not a function
I'm implementing React Query's useMutation for a simple api call (a user logout). I've written a code that seems correct, ...
Read more >GraphQL Mutation vs Query – When to use a GraphQL Mutation
If queries are the GraphQL equivalent to GET calls in REST, then mutations represent the state-changing methods in REST (like DELETE , PUT...
Read more >Logout in React with GraphQL - Part 47 - YouTube
Learn how to logout users in React with GraphQL.Code: https://github.com/benawad/fullstack-graphql-airbnb-clone/tree/47_logoutPlaylist: ...
Read more >Authorization and the logOut Resolver - Building Full Stack ...
We will also see how we can implement the logOut mutation. ... for signing and verification, but this is not always the case...
Read more >Mutations - Ariadne GraphQL
logout that takes no arguments and just returns status. Writing resolvers. Mutation resolvers are no different than resolvers used by other types. They...
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
I agree. Will be implemented in next major release, probably in the next few days 😃
@lupas I tested onAuthStateChanged and ssr auth. It’s work great. Thanks!