genetic-orange
genetic-orange16mo ago

Authentication with Strapi

I am not able to use Strapi authentication together with refine. My client connects normally with the API (I can access the collections when I disable the authProvider). When I try to use the authProvider, it returns a 400 error. Could someone help me? Grateful for the attention.
6 Replies
refine-support-bot
Hey, I am refine support bot :wave:. I am here to help you with your question. I searched for the answer to your question in the refine documentation and could not find an answer. Please wait for someone from the refine core team or the community to try to help you. 👊
variable-lime
variable-lime16mo ago
Hey @Rodrigo Cândido, Did you check out our strapi example? You can find here: https://refine.dev/docs/examples/data-provider/strapi-v4/
genetic-orange
genetic-orange16mo ago
Hello @salihozdemir. I had already checked the strapi example and configured the API connection url. I imagine my problem is related to strapi's login permissions, but I don't know how to configure this to work with refine.
variable-lime
variable-lime16mo ago
You should set your resources’ permissions to ‘Auth’ instead of the ‘public’ in the Settings tab on your strapi admin panel. I don’t remember exacly how to set it up. You can find it in the strapi documantations.
genetic-orange
genetic-orange16mo ago
I just realized that when submitting the login form (generated by refine) the identifier (e-mail) is not being sent to the body of the request, only the password.
variable-lime
variable-lime16mo ago