Your One-Time Password (OTP) is:
79 |Please use this OTP to complete your login process. Do not share this code with anyone.
81 |├── logo.png ├── banner.png ├── themes ├── v1.PNG ├── v2.PNG ├── v3.PNG ├── v4.png ├── v5.png └── v6.PNG ├── analysis_options.yaml ├── .metadata ├── .gitignore ├── pubspec.yaml ├── LICENSE ├── CHANGELOG.md ├── templates ├── v4.html ├── v6.html ├── v5.html ├── v3.html ├── v2.html └── v1.html ├── example └── example.md ├── README.md └── lib └── email_otp.dart /logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rohit-chouhan/email_otp/HEAD/logo.png -------------------------------------------------------------------------------- /banner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rohit-chouhan/email_otp/HEAD/banner.png -------------------------------------------------------------------------------- /themes/v1.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rohit-chouhan/email_otp/HEAD/themes/v1.PNG -------------------------------------------------------------------------------- /themes/v2.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rohit-chouhan/email_otp/HEAD/themes/v2.PNG -------------------------------------------------------------------------------- /themes/v3.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rohit-chouhan/email_otp/HEAD/themes/v3.PNG -------------------------------------------------------------------------------- /themes/v4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rohit-chouhan/email_otp/HEAD/themes/v4.png -------------------------------------------------------------------------------- /themes/v5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rohit-chouhan/email_otp/HEAD/themes/v5.png -------------------------------------------------------------------------------- /themes/v6.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rohit-chouhan/email_otp/HEAD/themes/v6.PNG -------------------------------------------------------------------------------- /analysis_options.yaml: -------------------------------------------------------------------------------- 1 | include: package:flutter_lints/flutter.yaml 2 | 3 | # Additional information about this file can be found at 4 | # https://dart.dev/guides/language/analysis-options 5 | -------------------------------------------------------------------------------- /.metadata: -------------------------------------------------------------------------------- 1 | # This file tracks properties of this Flutter project. 2 | # Used by Flutter tool to assess capabilities and perform upgrades etc. 3 | # 4 | # This file should be version controlled and should not be manually edited. 5 | 6 | version: 7 | revision: 5464c5bac742001448fe4fc0597be939379f88ea 8 | channel: stable 9 | 10 | project_type: package 11 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Miscellaneous 2 | *.class 3 | *.log 4 | *.pyc 5 | *.swp 6 | .DS_Store 7 | .atom/ 8 | .buildlog/ 9 | .history 10 | .svn/ 11 | 12 | # IntelliJ related 13 | *.iml 14 | *.ipr 15 | *.iws 16 | .idea/ 17 | 18 | # The .vscode folder contains launch configuration and tasks you configure in 19 | # VS Code which you may wish to be included in version control, so this line 20 | # is commented out by default. 21 | #.vscode/ 22 | 23 | # Flutter/Dart/Pub related 24 | # Libraries should not include pubspec.lock, per https://dart.dev/guides/libraries/private-files#pubspeclock. 25 | /pubspec.lock 26 | **/doc/api/ 27 | .dart_tool/ 28 | .packages 29 | build/ 30 | test/ 31 | -------------------------------------------------------------------------------- /pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: email_otp 2 | description: A fast & simple email authentication OTP sender and verification flutter package. 3 | version: 3.1.0 4 | homepage: https://rohitchouhan.com 5 | repository: https://github.com/rohit-chouhan/email_otp 6 | 7 | environment: 8 | sdk: ">=2.16.2 <4.0.0" 9 | flutter: ">=1.17.0" 10 | 11 | dependencies: 12 | flutter: 13 | sdk: flutter 14 | http: ^1.6.0 15 | mailer: ^6.6.0 16 | 17 | dev_dependencies: 18 | flutter_test: 19 | sdk: flutter 20 | flutter_lints: ^4.0.0 21 | 22 | screenshots: 23 | - description: "Email OTP Logo" 24 | path: logo.png 25 | 26 | topics: 27 | - email 28 | - otp 29 | - smtp 30 | - authentication 31 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2022 Rohit Chouhan 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | ## 3.1.0 2 | - **BREAKING CHANGE**: Removed server-side dependency. Now sends emails directly from the client. 3 | - **REQUIRED**: You must now provide your own SMTP credentials using `EmailOTP.setSMTP()`. 4 | - Added remote template fetching from GitHub via jsDelivr. 5 | - Added dependency `mailer` and `http`. 6 | 7 | 8 | - OTP expiry option added 9 | - `getOTP` changed into method `getOTP()` 10 | - `isExpired()` method added to validate otp expiry time 11 | - `v6` New theme added 12 | - bugs fixed 13 | 14 | ## 3.0.1 15 | 16 | - Documentation broken image link fixed 17 | 18 | ## 3.0.0 19 | 20 | - Various bug fixes have been implemented. 21 | - Documentation has been improved for better clarity and ease of use. 22 | - New features added. 23 | - Added new themes: v4 and v5. 24 | - Replaced `setConfig()` with `config()`. 25 | - In the `sendOTP()` method, use the `userEmail:` property. 26 | - Removed the `auth:` property from the `setSMTP` method; it is no longer needed. 27 | - You can now easily pass the OTP type using the `OTPType` enum class. 28 | - You can now pass the `smtp_port:` value easily using the `EmailPort` enum class. 29 | - You can now pass the `smtp_secure:` value easily using the `SecureType` enum class. 30 | - You can now select themes using the `EmailTheme` enum class. 31 | 32 | ## 2.1.2 33 | 34 | - bugs fixed 35 | - theme customization [added] 36 | 37 | ## 2.1.1 38 | 39 | - error handling [added] 40 | 41 | ## 2.1.0 42 | 43 | - bug fixed 44 | - Customize Template [added] 45 | 46 | ## 2.0.1 47 | 48 | - bug fixed 49 | 50 | ## 2.0.0 51 | 52 | - bug fixed 53 | - new cool email template 54 | - new feature added for custom SMTP 55 | 56 | ## 1.0.4 57 | 58 | - format fixed 59 | 60 | ## 1.0.3 61 | 62 | - otpType property added. 63 | 64 | ## 1.0.2 65 | 66 | - Changed class Name from Email_OTP to EmailOTP. 67 | - otpLength property added. 68 | 69 | ## 1.0.1 70 | 71 | - readme changed. 72 | 73 | ## 1.0.0 74 | 75 | - initial release. 76 | -------------------------------------------------------------------------------- /templates/v4.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |
6 | 7 | 8 | 67 |Your One-Time Password (OTP) is:
79 |Please use this OTP to complete your login process. Do not share this code with anyone.
81 |Dear User,
73 |Your One-Time Password (OTP) is:
74 |Please use this OTP to complete your login process. Do not share this code with anyone.
78 |Thank you for using {{appName}}!
79 |Your OTP is {{otp}}
30 |This OTP is valid for 5 minutes.
31 |Thank you for using our service.
32 |Dear User,
82 |Your One-Time Password (OTP) is:
83 |Please use this OTP to complete your login process. Do not share this code with anyone.
85 |Thank you for using {{appName}}!
86 |Your requested OTP for 110 | {{appName}} 111 |
20 |
|
78 |
|
93 | | `EmailTheme.v5` |
|
94 | | `EmailTheme.v6` | Your OTP is {{otp}}
110 |This OTP is valid for 5 minutes.
111 |Thank you for using our service.
112 |Hello,
286 |Your verification code for {{appName}} is:
287 |Please do not share this code with anyone.
289 || 112 | |
115 |
117 |
118 |
119 |
202 |
|
203 | 204 | |