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

      GPT-5 should have a higher “degree of scientific certainty” than the current ChatGPT — but with less model switching

      May 20, 2025

      Elon Musk’s Grok 3 AI coming to Azure proves Satya Nadella’s allegiance isn’t to OpenAI, but to maximizing Microsoft’s profit gains by heeding consumer demands

      May 20, 2025

      One of the most promising open-world RPGs in years is releasing next week on Xbox and PC

      May 20, 2025

      NVIDIA’s latest driver fixes some big issues with DOOM: The Dark Ages

      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

      Community News: Latest PECL Releases (05.20.2025)

      May 20, 2025
      Recent

      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

      Universal Design and Global Accessibility Awareness Day (GAAD)

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

      GPT-5 should have a higher “degree of scientific certainty” than the current ChatGPT — but with less model switching

      May 20, 2025
      Recent

      GPT-5 should have a higher “degree of scientific certainty” than the current ChatGPT — but with less model switching

      May 20, 2025

      Elon Musk’s Grok 3 AI coming to Azure proves Satya Nadella’s allegiance isn’t to OpenAI, but to maximizing Microsoft’s profit gains by heeding consumer demands

      May 20, 2025

      One of the most promising open-world RPGs in years is releasing next week on Xbox and PC

      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

    Security

    Nmap 7.96 Launches with Lightning-Fast DNS and 612 Scripts

    May 20, 2025
    Common Vulnerabilities and Exposures (CVEs)

    CVE-2025-4996 – Intelbras RF 301K Cross-Site Scripting Vulnerability

    May 20, 2025
    Leave A Reply Cancel Reply

    Hostinger

    Continue Reading

    mozex/anthropic-laravel

    Development

    2024 Is The Year of Elections… And Disinformation

    Development

    Orbital Mechanics (or How I Optimized a CSS Keyframes Animation)

    News & Updates

    The coolest gadgets I saw at Pepcom’s Spring Spectacular

    Tech & Work

    Highlights

    Development

    FBI Deletes PlugX Malware from 4,250 Hacked Computers in Multi-Month Operation

    January 15, 2025

    The U.S. Department of Justice (DoJ) on Tuesday disclosed that a court-authorized operation allowed the…

    CVE-2025-43560 – ColdFusion Arbitrary Code Execution Vulnerability

    May 13, 2025

    CVE-2025-32821 – SMA100 Command Injection Vulnerability

    May 7, 2025

    Microsoft makes Windows 11’s Narrator app a lot more useful with these new killer functions

    February 14, 2025
    © DevStackTips 2025. All rights reserved.
    • Contact
    • Privacy Policy

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