Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Nopass Laravel Package

lakm/nopass

Passwordless authentication helpers for Laravel 10/11. Send secure verification links or one-time passcodes (OTP) to log users in without passwords. Includes configuration, usage examples, testing, and security guidance.

View on GitHub
Deep Wiki
Context7

Overview | How it works | Verification link | OTP code | Usage examples | Changelog | Testing | Security | License

Passwords are no longer secure!

Laravel GitHub Actions Workflow Status Packagist Version Downloads GitHub License

Overview

"I'm so fed up with passwords! I have to reset them all the time."

"Oh no, my passwords were leaked. I bet it's my password manager's fault."

"Someone accessed my account—I think they guessed my weak password."

We've all encountered one of these issues at some point. As the internet has evolved, there are now websites for almost everything we need. Modern users often have more than five accounts online.

How many online accounts do you have? The answer is likely more than one—probably more than 10. So, how do you manage to remember the passwords for each of these accounts? Here are a few options you might consider:

  • Memorize them.
  • Use a password manager.
  • Reset your password every time you forget it. 😂

We can easily rule out the first option since most of us aren't blessed with a superhuman memory. While password managers are a popular choice, their security isn't foolproof—data breaches and password leaks happen far too often, making them a less-than-reliable option.

That is the users' side of story. It's our responsibility to provide more convenience authentication methods for our users and improve user experiences. That is what this package made for.

!Note The package doesn't provide any authentication method. Instead, it provides two methods to use in your existing auth system. You can use any authentication like breeze, jetstream or custom one. Sample implementation has been provided in demo project

How it works

The package offers two methods for verification: sending a verification link to the user's email address or sending an OTP (One-Time Password) to the user's mobile number.

Verification link

Generate a link

    use LakM\NoPass\Facades\NoPass;
    
    $data = [];
    
    $link = NoPass::for($user)
        ->email()
        ->routeName('login-link')
        ->generate($data); // Data are attached to query string

OTP Code

Generate a OTP code

    use LakM\NoPass\Facades\NoPass;
    
    $link = NoPass::for($user)
        ->otp()
        ->generate();

Check validity

Check Email

    use LakM\NoPass\Facades\NoPass;
    
    $isValid = NoPass::for($user)
            ->isValid();

Check OTP

    use LakM\NoPass\Facades\NoPass;
    
    $isValid = NoPass::for($user)
            ->isValid($otp);

Invalidate

    use LakM\NoPass\Facades\NoPass;
    
    $isValid = NoPass::for($user)
            ->inValidate();

Usage Examples

Changelog

Please see CHANGELOG for more information what has changed recently.

Testing

./vendor/bin/pest

Security

Please see here for our security policy.

License

The MIT License (MIT). Please see License File for more information.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
besmartand-pro/php-quality-config
sentix/ai-chatbot
terminal42/code-quality-tools
codifyo/ts-generator-bundle
testo/fiber
mintobit/jobqueue
a4sex/maintenance-bundle
a4sex/entity-date-update
a4sex/client-identifier
a4sex/base-utilites
a4sex/key-value-storage
a4sex/micro-status
chilldev/dependency-injection-extra
datinglibre/datinglibre-app-api
biberltd/corebundle
bricre/symfony-bundle-test
biberltd/logbundle
dominium/http-adapter-bundle
dominium/google-analytics
a4sex/auto-clean-entity