Hello! I want to use /api/auth/local/ to login on strapi.
I create a user using the admin panel. I try login using the panel. ok. I call to /api/auth/local but I get “Invalid identifier or password”. This is the fetch I use:
fetch(`${VITE_CLIENT}/api/auth/local`, {
method: "POST",
headers: {
'Content-Type': "application/json"
},
body: JSON.stringify(credentials)
}).then(data => data.json())
If I try with the first user goes ok.
If I create the user from API, the login goes ok.
All the users have “superadmin” role.
If I create the user from admin panel,I can not login from API? Any idea why I can’t login using the login API with a user created from the admin panel?
Thanks!
This topic has been created from a Discord post (1292882227931254927) to give it more visibility.
It will be on Read-Only mode here.
Join the conversation on Discord