collab/module-customer-passwordless-login

A Magento 2 module which provides service to allow customers to login without a password

1.0.0 2024-02-26 12:08 UTC

This package is auto-updated.

Last update: 2024-04-28 20:31:37 UTC


README

The Collab_CustomerPasswordLessLogin module allows You to use its service in order to create an account or login frontend user without the need of a password. Useful for integrations with 3rd party authenticatators like Google, Facebook and theirs services like Facebook Login, Google One Tap etc.

Basic usage

<?php
...
use Collab\CustomerPasswordLessLogin\Service\LoginWithoutPassword;
...
public function __construct(
    protected LoginWithoutPassword $loginWithoutPassword
) {
}
...
$this->loginWithoutPassword->login([
    'email' => $payload['email'],
    'firstName' => $payload['given_name'],
    'lastName' => $payload['family_name']
]);
...

Service's login method accepts an array with the following keys:

  • email
  • firstName
  • lastName

Installation details

composer collab/module-customer-passwordless-login
bin/magento setup:upgrade