All Projects → JerinFrancisA → flutter_otp

JerinFrancisA / flutter_otp

Licence: MIT license
A Flutter package for iOS and Android for sending and verifying OTP to a Phone number.

Programming Languages

dart
5743 projects

Projects that are alternatives of or similar to flutter otp

Immortal
Helper modules for OTP applications
Stars: ✭ 160 (+171.19%)
Mutual labels:  otp
Go Otp
Package go-otp implements one-time-password generators used in 2-factor authentication systems like RSA-tokens. Currently this supports both HOTP (RFC-4226), TOTP (RFC-6238) and Base32 encoding (RFC-3548) for Google Authenticator compatibility
Stars: ✭ 194 (+228.81%)
Mutual labels:  otp
Gotp
Golang OTP(One-Time Password) Library.
Stars: ✭ 233 (+294.92%)
Mutual labels:  otp
Otpview
A custom view to enter otp/pin of different sizes used usually in cases of authentication.
Stars: ✭ 172 (+191.53%)
Mutual labels:  otp
Cuneiform
Cuneiform distributed programming language
Stars: ✭ 175 (+196.61%)
Mutual labels:  otp
Twofactor totp
🔑 Second factor TOTP (RFC 6238) provider for Nextcloud
Stars: ✭ 203 (+244.07%)
Mutual labels:  otp
Android Otp Extractor
Extracts OTP tokens from rooted Android devices
Stars: ✭ 147 (+149.15%)
Mutual labels:  otp
Pin code fields
A flutter package which will help you to generate pin code fields with beautiful design and animations. Can be useful for OTP or pin code inputs 🤓🤓
Stars: ✭ 245 (+315.25%)
Mutual labels:  otp
Otp cheatsheet
Base OTP behaviors presented as schemas
Stars: ✭ 190 (+222.03%)
Mutual labels:  otp
Freeotpplus
Enhanced fork of FreeOTP-Android providing a feature-rich 2FA authenticator
Stars: ✭ 223 (+277.97%)
Mutual labels:  otp
Multiotp
multiOTP open source strong two factor authentication PHP library, OATH certified, with TOTP, HOTP, Mobile-OTP, YubiKey, SMS, QRcode provisioning, etc.
Stars: ✭ 173 (+193.22%)
Mutual labels:  otp
React Otp Input
✔️ OTP Input Component for React
Stars: ✭ 177 (+200%)
Mutual labels:  otp
Otpclient
Highly secure and easy to use OTP client written in C/GTK that supports both TOTP and HOTP
Stars: ✭ 206 (+249.15%)
Mutual labels:  otp
Authorizer
Authorizer is a Password Manager for Android. It emulates an HID keyboard over USB and enters your credentials on your target device. Additionally it supports OTP 🔑📴
Stars: ✭ 172 (+191.53%)
Mutual labels:  otp
Libreoffice Impress Templates
Freely-licensed LibreOffice Impress templates
Stars: ✭ 238 (+303.39%)
Mutual labels:  otp
Flutter pinput
🔥🚀 Flutter package to create Pin code input text field with every pixel customization possibility 🎨 with beautiful animations
Stars: ✭ 157 (+166.1%)
Mutual labels:  otp
Svpinview
SVPinView is a light-weight customisable library used for accepting pin numbers or one-time passwords.
Stars: ✭ 197 (+233.9%)
Mutual labels:  otp
flutter dynamic forms
A collection of flutter and dart libraries allowing you to consume complex external forms at runtime.
Stars: ✭ 197 (+233.9%)
Mutual labels:  flutter-package
Onetimepassword
🔑 A small library for generating TOTP and HOTP one-time passwords on iOS.
Stars: ✭ 243 (+311.86%)
Mutual labels:  otp
Nitrokey App
Nitrokey's Application (Win, Linux, Mac)
Stars: ✭ 210 (+255.93%)
Mutual labels:  otp

Awesome Flutter contributions welcome Known Vulnerabilities Build Status

flutter_otp

A Flutter package for Android and iOS for sending and verifying OTP to a Phone number.

Important message for existing Users

NEW FEATURE !!

Now you can send the message to any country code passed as a parameter to the interface (sendOtp() function)

Installing

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:

dependencies:
  flutter_otp: ^0.3.2

2. Install it

You can install packages from the command line: with Flutter:

$ flutter packages get

Alternatively, your editor might support flutter packages get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:

import 'package:flutter_otp/flutter_otp.dart';

Functions

The important functions used in the package are :

  1. sendOtp() to send a OTP (four digit by default, but customizable):
void sendOtp(String phoneNumber, [String messageText]) {
    ...        
}

NOTE:

  1. 10 digit phoneNumber should be passed.
  2. parameter "messageText" is optional. By default the message text is "Your OTP is : XXXX". If "messageText" parameter is passed then message is sent as " XXXX".
  1. resultChecker() which takes the OTP entered by the user as a parameter. The function returns true if OTP is matched, else false is returned.
bool resultChecker(int enteredOtp) {
    ...
} 

NOTE: The OTP entered by user (say, through TextField widget or TextFormField widget etc) is to be passed as a parameter to this function.

Usage

To use this package in your application you need to have a sim card in your mobile.

Example Usage:

...
sendOtp('958347XXXX');  //Pass phone number as String

...

int enteredOtp;
TextField(
  onChanged: (val) {
    enteredOtp = val;    
  }
)

...

bool isCorrectOTP = resultChecker();
if(isCorrectOTP) {
    print('Success');
} else {
    print('Failure');
}
...

OR custom "messageText" can be passed as parameter to sendOTP

...
sendOtp('958347XXXX', 'OTP is : ');  //Pass phone number and Custom messaseText as String

...

int enteredOtp;
TextField(
  onChanged: (val) {
    enteredOtp = val;    
  }
)

...

bool isCorrectOTP = resultChecker();
if(isCorrectOTP) {
    print('Success');
} else {
    print('Failure');
}
...

Contributors

  1. Fawaz Hussain
  2. Jerin Francis

the repo to show support!

More Information

Pub package Flutter documentation.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].