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
- Initialize the SDK
void main() {
PrefabsTechUser.initialize(apiBaseUrl: '<your_api_url>');
}
Dependencies
License
BSD-3-Clause
Acknowledgements
- Flutter Team
- Supertokens Team
- Dio Contributors
Libraries
- apis/apis
- apis/interceptors/interceptors
- apis/interceptors/supertokens
- apis/supertokens
- app
- models/base_user
- models/enums/enums
- models/enums/supertokens_response_status
- models/enums/third_party_login_providers
- models/models
- models/response/auth/change_password
- models/response/auth/delete_account
- models/response/auth/fetch_invitation
- models/response/auth/forget_password
- models/response/auth/login_sign_up
- models/response/auth/reset_password
- models/response/auth/verify_email
- models/response/responses
- providers/base_auth
- providers/providers
- providers/supertokens
- user
- utils/supertokens
- utils/utils