Download the PHP package secureprompt/laravel-device-approval without Composer

On this page you can find all versions of the php package secureprompt/laravel-device-approval. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-device-approval

SecurePrompt Laravel

Composer: secureprompt/laravel-device-approval
Current release: v0.1.0-beta.1

Trusted-device login approval for Laravel applications: primary credentials remain the responsibility of the host application, while SecurePrompt adds a cryptographic trusted-device approval layer with number matching and a short-lived, one-time approval grant.

Status: v0.1.0-beta.1

SecurePrompt is currently in beta.

It is not yet a production-complete v1.0 release.

Included in this beta

Explicit beta limitations

Requirements

Installation

Laravel discovers SecurePromptServiceProvider automatically. Do not register it manually.

The package source is publicly available on GitHub. Packagist distribution is being prepared for the beta release. A Composer path repository may still be used for local package development.

1. Generate key

Add to .env:

Do not commit this value. Changing it later invalidates device credentials and verifier digests. Key rotation is not implemented yet.

2. Migrate

Package migrations load automatically (no manual copy required).

3. Optional config publish

Publishing is optional. Defaults work for local development once SECUREPROMPT_KEY is set.

ApprovalSubject setup

Any authenticatable model may participate. SecurePrompt does not assume App\Models\User.

Critical: do not Auth::attempt() before SecurePrompt

Auth::attempt() creates an authenticated Laravel session immediately. Using it before SecurePrompt approval defeats SecurePrompt as a second factor:

Correct host flow:

Session auth integration sketch

Enable the adapter:

After the trusted device approves and the requester obtains a grant:

See the sibling secureprompt-demo application for a Sail + MySQL consumer example.

Trusted devices

SecurePrompt does not auto-trust the first device. Host applications must implement a deliberate enrollment policy (re-authentication, passkey, existing device approval, etc.).

Configuration

Env / config Purpose
SECUREPROMPT_KEY → secureprompt.crypto.key Dedicated HMAC key
SECUREPROMPT_ENABLED → secureprompt.enabled When false, HTTP routes are not registered. Orchestration services remain available.
secureprompt.http.prefix Route prefix (default secureprompt)
secureprompt.http.middleware Middleware for device + generic consume routes (default [])
SECUREPROMPT_SESSION_ENABLED → secureprompt.session.enabled Opt-in Laravel session auth adapter (default false)
secureprompt.session.middleware Middleware for requester + session-complete routes (default ['web'])

HTTP protocol

Routes load when secureprompt.enabled=true.

Method Path Auth material
POST /secureprompt/approvals Subject resolver (pending session when session auth enabled)
POST /secureprompt/approvals/{challenge}/confirm device_id + X-SecurePrompt-Device-Credential
POST /secureprompt/approvals/{challenge}/reject device id + credential
POST /secureprompt/approvals/{challenge}/number-match device + { "number": 47 }
POST /secureprompt/approvals/{challenge}/status X-SecurePrompt-Requester-Proof
POST /secureprompt/approvals/{challenge}/grant requester proof
POST /secureprompt/grants/{grant}/consume X-SecurePrompt-Grant-Secret (authorization only — no Auth::login())
POST /secureprompt/session/complete grant id + secret (session auth only — consume + login)

Status is POST because it requires a secret proof and may persist expiry. Never put secrets in query strings.

Security architecture (summary)

Development

Docker-first package workflow:

Individual scripts: composer test, composer lint, composer analyse, composer validate --strict.

License

MIT


All versions of laravel-device-approval with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
illuminate/auth Version ^12.0 || ^13.0
illuminate/console Version ^12.0 || ^13.0
illuminate/contracts Version ^12.0 || ^13.0
illuminate/database Version ^12.0 || ^13.0
illuminate/http Version ^12.0 || ^13.0
illuminate/routing Version ^12.0 || ^13.0
illuminate/session Version ^12.0 || ^13.0
illuminate/support Version ^12.0 || ^13.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package secureprompt/laravel-device-approval contains the following files

Loading the files please wait ...