AuthProvider not recognized in @refine/core
AuthProvider not recognized in @refine/core
2 Replies
Hi @M3HDI. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
----------------------
It seems like you're trying to import
AuthProvider
from @refinedev/core
, but it's not being recognized. This is because the AuthProvider
has been updated in the latest version of Refine and the documentation might not have been updated yet to reflect this change.
As per the discussion on Discord (https://discord.com/channels/837692625737613362/1199756403611553882), you should use AuthBindings
import from @refinedev/core
instead of AuthProvider
.
Here's how you can do it:
However, if you want to continue using the authProvider@v3
, you can use it as legacyAuthProvider
in your project as mentioned in the migration guide (https://refine.dev/docs/migration-guide/auth-provider/#backward-compatibility). Here's how you can do it:
And add v3LegacyAuthProviderCompatible: true
to your auth hooks:
Please note that legacyAuthProvider
will be removed in the next major version.
----------------------
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
----------------------<@751100082274828380> kapa.ai is still learning and improving, please let us know how it did by reacting below