-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
[BUG] mutationOptions
are overriding Refine's behavior unexpectedly
#5888
Comments
As this can be seen from this line: refine/packages/core/src/hooks/auth/useLogin/index.ts Lines 33 to 36 in e5cad51
We're omitting On all other Refine hooks, we've omitted |
@aliemir How can one provide redirect after successful |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Describe the bug
Consider this:
And
authProvider.ts
as follow:Then
onSuccess
callback onuseLogin
will override the Refine's behavior foronSuccess
causing theredirectTo
to not work.Steps To Reproduce
authProvider
onSuccess
callback inuseLogin({ mutationOptions: onSuccess() { /* callback */ }});
Expected behavior
mutationOptions
should work along side the Refine's default behavior, redirect should occur.Packages
Additional Context
No response
The text was updated successfully, but these errors were encountered: