Authentication is the process by which a user verifies their identity to access specific resources in an application. Typically, this involves logging in with a username and password. The client submits these credentials, and the server then compares them against its database to confirm the user's identity.
the dotenv will not be initialized? await dotenv.load(fileName: “.env”);
is missing in the main.dart
if i try to register a user, i get the error that “role” is a necessary field? There isnt a single word about roles in this article - but yeah, in the model “user” in strapi that field is required. When using postman, you’ll get the same error as in Flutter. In Strapi there are two default roles “Public” and “Authenticated”. But i cant hand over any of these in the body of my post-request?
Would appreciate some more information on that topic
In a standard installation of Strapi, the “User & Permission”-Plugin is now activated from the start on.
So a simple post to the endpoint /users will have the role field as mandatory. But with that plugin you shouldn’t trigger the endpoint directly.
Instead trigger the url /auth/local/register for SignUp and /auth/local for SignIn.
how is it save to login a user by getting the list of users and checking if it has the same email as you filled in without checking the password? Or am I missing something?