You are here

public function Authentication::email_passwordless_start in Auth0 Single Sign On 8.2

Start passwordless login process for email

@link https://auth0.com/docs/api/authentication#get-code-or-link

Parameters

string $email Email address to use.:

string $type Use null or "link" to send a link, use "code" to send a verification code.:

array $authParams Link parameters (like scope, redirect_uri, protocol, response_type) to modify.:

Return value

mixed

File

vendor/auth0/auth0-php/src/API/Authentication.php, line 273

Class

Authentication
Class Authentication

Namespace

Auth0\SDK\API

Code

public function email_passwordless_start($email, $type, array $authParams = []) {
  $data = [
    'client_id' => $this->client_id,
    'connection' => 'email',
    'send' => $type,
    'email' => $email,
  ];
  if (!empty($authParams)) {
    $data['authParams'] = $authParams;
  }
  return $this->apiClient
    ->method('post')
    ->addPath('passwordless')
    ->addPath('start')
    ->withBody(json_encode($data))
    ->call();
}