Skip to content

iniakunhuda/flutter_auth_riverpod_strapi

Repository files navigation

Flutter Simple Auth with Riverpod & Strapi


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)

feed example feed example feed example feed example

Package

Strapi Setup

Running in local / deploy to production

feed example



Rest API

Happy Scenario

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"
    }
}

Bad Scenario

Body

{
    "identifier": "[email protected]",
    "password": "huda123453"
}

Response

{
    "data": null,
    "error": {
        "status": 400,
        "name": "ValidationError",
        "message": "Invalid identifier or password",
        "details": {}
    }
}

About

Simple Authentication Login with Riverpod Flutter + Strapi API

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages