prefabs_user

A reusable Flutter package that simplifies authentication using Supertokens and Dio. This package provides a clean abstraction for handling login, signup, session management, token refresh, and authenticated HTTP requests in Flutter applications.

Features

  • Authentication powered by Supertokens
  • HTTP client integration using Dio
  • Easy-to-use APIs for login, signup, logout, reset password, email verification
  • Graphql support
  • Secure request/response interception
  • Works on Android, iOS, Web, and Desktop

Getting started

Add the package to your pubspec.yaml:

dependencies:
    prefabs_user: ^0.2.0

Then run:

flutter pub get

Usage

  1. Initialize the SDK
void main() {
    PrefabsTechUser.initialize(apiBaseUrl: '<your_api_url>');
}

Dependencies

License

BSD-3-Clause

Acknowledgements

  • Flutter Team
  • Supertokens Team
  • Dio Contributors