Close Menu
    DevStackTipsDevStackTips
    • Home
    • News & Updates
      1. Tech & Work
      2. View All

      Sunshine And March Vibes (2025 Wallpapers Edition)

      May 20, 2025

      The Case For Minimal WordPress Setups: A Contrarian View On Theme Frameworks

      May 20, 2025

      How To Fix Largest Contentful Paint Issues With Subpart Analysis

      May 20, 2025

      How To Prevent WordPress SQL Injection Attacks

      May 20, 2025

      Helldivers 2: Heart of Democracy update is live, and you need to jump in to save Super Earth from the Illuminate

      May 20, 2025

      Qualcomm’s new Adreno Control Panel will let you fine-tune the GPU for certain games on Snapdragon X Elite devices

      May 20, 2025

      Samsung takes on LG’s best gaming TVs — adds NVIDIA G-SYNC support to 2025 flagship

      May 20, 2025

      The biggest unanswered questions about Xbox’s next-gen consoles

      May 20, 2025
    • Development
      1. Algorithms & Data Structures
      2. Artificial Intelligence
      3. Back-End Development
      4. Databases
      5. Front-End Development
      6. Libraries & Frameworks
      7. Machine Learning
      8. Security
      9. Software Engineering
      10. Tools & IDEs
      11. Web Design
      12. Web Development
      13. Web Security
      14. Programming Languages
        • PHP
        • JavaScript
      Featured

      HCL Commerce V9.1 – The Power of HCL Commerce Search

      May 20, 2025
      Recent

      HCL Commerce V9.1 – The Power of HCL Commerce Search

      May 20, 2025

      Community News: Latest PECL Releases (05.20.2025)

      May 20, 2025

      Getting Started with Personalization in Sitecore XM Cloud: Enable, Extend, and Execute

      May 20, 2025
    • Operating Systems
      1. Windows
      2. Linux
      3. macOS
      Featured

      Helldivers 2: Heart of Democracy update is live, and you need to jump in to save Super Earth from the Illuminate

      May 20, 2025
      Recent

      Helldivers 2: Heart of Democracy update is live, and you need to jump in to save Super Earth from the Illuminate

      May 20, 2025

      Qualcomm’s new Adreno Control Panel will let you fine-tune the GPU for certain games on Snapdragon X Elite devices

      May 20, 2025

      Samsung takes on LG’s best gaming TVs — adds NVIDIA G-SYNC support to 2025 flagship

      May 20, 2025
    • Learning Resources
      • Books
      • Cheatsheets
      • Tutorials & Guides
    Home»Development»One-time Password Manager for Laravel

    One-time Password Manager for Laravel

    December 26, 2024

    One-time Password Manager for Laravel

    The One-time Password (OTP) Manager package for Laravel provides a comprehensive set of methods to generate, send, verify, and manage OTPs. It also integrates with Laravel’s cache system to throttle OTP sending and provides a layer of security by tracking OTP requests:

    use SalehhashemiOtpManagerFacadeOtpManager;
    
    // Send a OTP
    OtpManager::send("1234567890");
    
    // Resend a OTP
    OtpManager::sendAndRetryCheck("1234567890");
    
    // Verify a OTP
    $isVerified = OtpManager::verify("1234567890", 123456, "uuid-string");
    
    // Delete a verification code
    OtpManager::deleteVerifyCode("1234567890");
    

    Managing OTPs is at the core of this package. To help integrate and use OTPs, this package provides events so you can listen to OTP events and perform custom logic, such as sending the OTP via SMS to a user.

    Main Features

    • Generate OTP codes
    • Send OTPs via mobile numbers
    • Resend OTPs with built-in throttling
    • Verify OTP codes
    • Track OTP requests
    • Rate limiting of OTP generation attempts (OtpRateLimiter middleware)
    • Otp Invalidation after multiple failed verifications
    • Automatic deletion of OTP codes after successful verification
    • Customize rate-limiting thresholds, max allowed attempts, and auto-delete
    • Supports multiple OTP types using enums
    • Customizable mobile number validation

    The package’s README has setup and usage examples. You can learn more about this package, get full installation instructions, and view the source code on GitHub.

    Related: Simple one-time password authentication in Laravel.


    The post One-time Password Manager for Laravel appeared first on Laravel News.

    Join the Laravel Newsletter to get all the latest
    Laravel articles like this directly in your inbox.

    Source: Read More 

    Facebook Twitter Reddit Email Copy Link
    Previous ArticleTop misconceptions about platform engineering (and what to do about them)
    Next Article Extracting Sequential Data with Laravel’s takeWhile

    Related Posts

    Development

    The ClipboardItem.supports() function is now Baseline Newly available

    May 20, 2025
    Development

    Iterator helpers have become Baseline Newly available

    May 20, 2025
    Leave A Reply Cancel Reply

    Hostinger

    Continue Reading

    Pacman: guida alla personalizzazione del gestore pacchetti di Arch Linux

    Linux

    International Baccalaureate Exam Hack Speculation Sparks Student Outrage

    Development

    OpenAI Introduces ‘Predicted Outputs’ Feature: Speeding Up GPT-4o by ~5x for Tasks like Editing Docs or Refactoring Code

    Development

    Element is not identifed in the second test method

    Development

    Highlights

    sled – embedded database

    February 10, 2025

    sled is an embedded database that’s written in the Rust programming language. The post sled…

    Microsoft Patch Tuesday March 2025: 6 Zero-Days, 10 High-Risk Vulnerabilities

    March 16, 2025

    How Agile Helps You Improve Your Agility

    May 12, 2025

    Pinta 3.0 Beta Released with New GTK4/Libadwaita UI

    January 28, 2025
    © DevStackTips 2025. All rights reserved.
    • Contact
    • Privacy Policy

    Type above and press Enter to search. Press Esc to cancel.