-
I initiated my project with google auth, but now I want to use custom auth so i can get more control over the authentication, but the auth pages are not showing when I navigate to /login, /register etc. I dont know what is wrong cos its not showing any error in console too. I followed doc here.. https://refine.dev/docs/examples/authentication/mui/ update: apparently the logout button does not clear the localstorage so when i cleared it manually, the auth pages appeared. Now i need help in how to make logout button clear localstorage. This is the logout function in authProvider |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hey @van-vince, by default, the logout button in Do you have a custom If you've switched from When Hope this resolves the issue 🙏 |
Beta Was this translation helpful? Give feedback.
Hey @van-vince, by default, the logout button in
<Sider>
uses theuseLogout
hook and calls thelogout
method of theauthProvider
. Just like the example you've linked above,logout
removes the local storage item and redirects to the path specified inredirectTo
.Do you have a custom
<Sider>
? You might want to check if thelogout
method is called properly.If you've switched from
v3
to v4and used codemod, then switched your
authProvider. I think you might have accidentally left
v3LegacyAuthProviderCompatible: true` in some of the authentication hooks.When
v3LegacyAuthProviderCompatible
is set totrue
, then it will use thelegacyRouterProvider
prop rather than therouterProvider
prop, which …