Download the PHP package mage-os/module-passkey-auth without Composer

On this page you can find all versions of the php package mage-os/module-passkey-auth. 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 module-passkey-auth

MageOS Passkey Authentication

Latest Stable Version License Total Downloads

Passwordless login for Magento 2 customer accounts using the WebAuthn/FIDO2 standard. Customers register passkeys (biometric, security key, or device PIN) and sign in with a single tap. There is no password to remember, phish, or leak.

Built on web-auth/webauthn-lib 5.2 or later.

Documentation: see the manual for setup, customer and admin guides, the headless API, and troubleshooting. Changes between releases are in CHANGELOG.md.

Key Features

Passwordless Authentication

Credential Management

Theme & API Coverage

Store Admin Controls

Screenshots

The storefront screenshots show the Luma theme.

Sign in with a passkey Enrollment prompt after password sign-in
Customer login page with a Account dashboard with a

My Account › Passkeys: add, rename and delete passkeys.

Passkeys table listing two passkeys with Rename and Delete actions and an Add a Passkey button

A passkey being renamed inline, with Save and Cancel buttons

On a phone Security notification email
Passkeys page at phone width with the table stacked into labelled rows Email telling the customer that a passkey named

Admin: the Customers › Customer Passkeys grid (single and mass revoke), and registering an admin passkey for two-factor authentication.

Customer Passkeys admin grid listing passkeys by customer email with Revoke actions

Admin two-factor setup screen with a Register Passkey button

Requirements

Component Version
PHP 8.2+
Magento Open Source / Mage-OS 2.4.6+
HTTPS Required (WebAuthn does not work over plain HTTP)

Installation

Customer passkeys are disabled by default on new installs. Upgrades from a pre-1.0 release that already has customer passkeys keep them on. Turn them on under Enable Passkey Authentication (see below), or run:

The admin passkey 2FA provider doesn't depend on this setting; it's managed with the other 2FA providers.

Configuration

Navigate to Stores > Configuration > Customers > Customer Configuration > Passkey Authentication.

Setting Description Default
Enable Passkey Authentication Master on/off switch for the storefront, REST and GraphQL features No
Prompt After Password Login Show enrollment banner on account pages after password sign-in Yes
Prompt After Account Creation Show enrollment banner on account pages after registration No
Email Customer When Passkeys Change Send a security notification when a passkey is added/removed Yes
Passkey Notification Email Sender Store identity used for notification emails General Contact
Passkey Added / Removed Email Template Theme-fallback template selection for the two notifications Module defaults

The Relying Party (RP) ID and allowed origins are derived automatically from the store's base URL. There is nothing to configure.

WebAuthn parameters (user verification, attestation conveyance, ceremony timeout, authenticator attachment, and max credentials per customer) use sane defaults internally and are not exposed as admin settings.

Architecture

Service Contracts

All business logic is exposed through Api interfaces:

Interface Implementation Purpose
RegistrationOptionsInterface Registration\OptionsGenerator Generate WebAuthn creation options
RegistrationVerifierInterface Registration\Verifier Verify attestation and store credential
AuthenticationOptionsInterface Authentication\OptionsGenerator Generate WebAuthn request options
AuthenticationVerifierInterface Authentication\Verifier Verify assertion and issue token
CredentialRepositoryInterface CredentialRepository Credential CRUD and getList()
CredentialManagementInterface CredentialManagement List, rename, delete credentials
CustomerPasskeyManagementInterface CustomerPasskeyManagement List, rename, register for the web API, without key material
WebAuthnConfigInterface Config Relying party and WebAuthn settings
Data\CredentialInterface Data\Credential Full stored credential (extensible)
Data\CustomerPasskeyInterface Data\CustomerPasskey Passkey as the web API returns it (extensible)
Data\CredentialSearchResultsInterface CredentialSearchResults getList() results
Data\AuthenticationResultInterface Data\AuthenticationResult Authentication result DTO

REST API

Method Endpoint Auth Purpose
POST /V1/passkey/registration/options Customer (self) Get creation options for navigator.credentials.create()
POST /V1/passkey/registration/verify Customer (self) Submit attestation response, receive the new passkey
POST /V1/passkey/authentication/options Anonymous Get request options for navigator.credentials.get()
POST /V1/passkey/authentication/verify Anonymous Submit assertion response, receive customer token
GET /V1/passkey/credentials Customer (self) List customer's registered passkeys
PUT /V1/passkey/credentials/:entityId Customer (self) Rename a passkey
DELETE /V1/passkey/credentials/:entityId Customer (self) Delete a passkey

Passkeys come back as {id, name, transports, created_at, last_used_at}, the same fields as GraphQL. See Headless API.

GraphQL API

The schema mirrors the REST surface; WebAuthn ceremony options travel as JSON strings (options_json) ready for navigator.credentials.create()/get():

Events

Event Payload Fired When
passkey_credential_register_after customer_id, entity_id, credential_id, credential New passkey registered
passkey_authentication_success customer_id, entity_id, credential_id, credential Successful passkey login
passkey_authentication_failure credential_id, customer_id, reason, message Failed passkey login
passkey_registration_failure customer_id, reason, message Passkey registration failed validation
passkey_credential_remove_after customer_id, entity_id, credential_id, credential Passkey deleted

entity_id is the row ID, credential_id the WebAuthn credential ID, and reason a fixed code (credential_not_found or verification_failed). Names and codes are constants on Model\PasskeyEvents. See the Developer guide.

A passkey sign-in also fires core customer_login, on the storefront and over REST, SOAP, and GraphQL.

The bundled notification emails are implemented as observers on the register/remove events, so they fire for every entry point (storefront, REST, GraphQL, admin revocation).

Database

passkey_credential: Stores registered WebAuthn credentials. One customer can have multiple credentials (up to 10). Foreign key to customer_entity with CASCADE delete.

passkey_challenge: Temporary single-use challenges with a 5-minute TTL. Cleaned up by the passkey_challenge_cleanup cron job.

Extensibility

Observing Passkey Events

Create an observer in your module's etc/events.xml:

Overriding Services

All service contracts can be replaced via DI preferences in etc/di.xml:

Frontend Customization

The module provides three jQuery UI widgets that can be extended via RequireJS mixins:

Templates are in view/frontend/templates/ and can be overridden via theme fallback. Styles use Luma/blank theme variables and patterns (.message.info, .data.table, .action.primary) for native theme consistency.

Testing

Security

Contributing

Issues and pull requests welcome on GitHub.

License

This module is licensed under the Open Software License 3.0.

Support


All versions of module-passkey-auth with dependencies

PHP Build Version
Package Version
Requires php Version >=8.2
magento/framework Version *
magento/module-authorization Version *
magento/module-backend Version *
magento/module-config Version *
magento/module-customer Version *
magento/module-email Version *
magento/module-integration Version *
magento/module-store Version *
magento/module-two-factor-auth Version *
magento/module-ui Version *
magento/module-user Version *
symfony/serializer Version ^6.4 || ^7.0 || ^8.0
web-auth/cose-lib Version ^4.2.3
web-auth/webauthn-lib Version ^5.2
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 mage-os/module-passkey-auth contains the following files

Loading the files please wait ...