uni_auth

Creator: coderz1093

Last updated:

0 purchases

TODO
Add to Cart

Description:

uni auth

UniAuth #
DEVELOPED BY UNICODE TEAM
UniAuth is a Flutter package designed to handle authentication modules in Flutter applications. It integrates various authentication services, primarily focusing on Firebase Auth for authentication and Unifonic for sending and verifying OTPs (One-Time Passwords).
Features #

Firebase Authentication for seamless sign-in and sign-up.
Integration with Unifonic for OTP-based authentication.
Comprehensive error handling and user feedback.
Highly customizable for various authentication scenarios.

Getting Started #
to use UniAuth in your Flutter project, follow these steps:
Installation #

Add UniAuth to your pubspec.yaml file:

dependencies:
uni_auth: latest_version
copied to clipboard

Run flutter pub get to install the package.

Usage #
Import UniAuth in your Dart file:
import 'package:uni_auth/uni_auth.dart';
copied to clipboard
Initialize UniAuth with your Firebase Instance and baseUrl:
Future<void> main() async {
WidgetsFlutterBinding.ensureInitialized();
// here First you need to initialize your firebase app
await Firebase.initializeApp(options: DefaultFirebaseOptions.currentPlatform);
// then init UniAuth Package and baseUrl and local as option
UniAuth.init(
auth: FirebaseAuth.instance,
locale: const Locale('en'), //Optional
baseUrl: 'YOUR_BASE_URL',
);

runApp(const MyApp());
}
copied to clipboard
Some Methods
Create User With Email and Password
await UniAuthService.createUserWithEmail(
authData: AuthData(
email: 'YOUR_EMAIL',
password: 'YOUR_PASSWORD',
),
);
copied to clipboard
Check User LoggedIn or Not
UniAuthService.checkUserLoggedIn;
copied to clipboard
Send and Verify OTP
UniAuthService.sendOTP(AuthData());
UniAuthService.verifyOTP(AuthData());
copied to clipboard
Login with token
UniAuthService.loginWithToken(token: 'YOUR_TOKEN');
copied to clipboard
Example #
An example application demonstrating how to use UniAuth is included in the package. Check the example directory for more details.
Contributing #
Contributions are welcome! If you would like to contribute, please fork the repository and submit a pull request.
License #
UniShipping is available under the MIT license. See the LICENSE file for more info.

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.