Mastering Flutter Authentication with Strapi CMS: A Step-by-Step Guide

Hey! :slight_smile:

I’ve got some issues, is here something missing?

  1. the dotenv will not be initialized?
    await dotenv.load(fileName: “.env”);
    is missing in the main.dart

  2. 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 :slight_smile:

Kind regards,
Alex