Flutter Flutter allows you to build beautiful native apps on iOS and Android Platforms from a single codebase. The main goal of this repository is to learn how to implement simple login authentication Riverpod (flutter state management) & Strapi (Rest API)
- RiverPod Hooks (https://riverpod.dev/)
- flutter_hooks (https://pub.dev/packages/flutter_hooks)
- Strapi API (https://strapi.io/)
- dio (https://pub.dev/packages/dio)
- dartz (https://pub.dev/packages/dartz)
- shared_preferences (https://pub.dev/packages/shared_preferences)
Running in local / deploy to production
Body
{
"identifier": "[email protected]",
"password": "huda12345"
}
Response
{
"jwt": "generated_jwt_token",
"user": {
"id": 1,
"username": "miftahulinc",
"email": "[email protected]",
"provider": "local",
"confirmed": true,
"blocked": false,
"createdAt": "2023-04-02T02:46:58.297Z",
"updatedAt": "2023-04-02T02:47:39.939Z"
}
}
Body
{
"identifier": "[email protected]",
"password": "huda123453"
}
Response
{
"data": null,
"error": {
"status": 400,
"name": "ValidationError",
"message": "Invalid identifier or password",
"details": {}
}
}