Skip to content

Issues with custom auth #3916

Answered by aliemir
van-vince asked this question in Q&A
Mar 18, 2023 · 1 comments · 1 reply
Discussion options

You must be logged in to vote

Hey @van-vince, by default, the logout button in <Sider> uses the useLogout hook and calls the logout method of the authProvider. Just like the example you've linked above, logout removes the local storage item and redirects to the path specified in redirectTo.

Do you have a custom <Sider>? You might want to check if the logout method is called properly.

If you've switched from v3 to v4and used codemod, then switched yourauthProvider. I think you might have accidentally left v3LegacyAuthProviderCompatible: true` in some of the authentication hooks.

When v3LegacyAuthProviderCompatible is set to true, then it will use the legacyRouterProvider prop rather than the routerProvider prop, which …

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@van-vince
Comment options

Answer selected by van-vince
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants