Passwordless
in package
Table of Contents
Properties
Methods
- __construct() : mixed
- createSession() : array<string|int, mixed>
- Create a Passwordless Session.
- sendSession() : void
- Send a Passwordless Session via email.
Properties
$client read-only
private
HttpClient
$client
Methods
__construct()
public
__construct(HttpClient $client) : mixed
Parameters
- $client : HttpClient
createSession()
Create a Passwordless Session.
public
createSession(string $email[, string $type = 'MagicLink' ][, string|null $redirectUri = null ][, string|null $state = null ][, int|null $expiresIn = null ]) : array<string|int, mixed>
Parameters
- $email : string
-
The email of the user to authenticate.
- $type : string = 'MagicLink'
-
The type of Passwordless Session ('MagicLink').
- $redirectUri : string|null = null
-
The redirect endpoint for the callback. (Optional)
- $state : string|null = null
-
Arbitrary state to pass through the redirect. (Optional)
- $expiresIn : int|null = null
-
Seconds until expiry (900-86400). (Optional)
Return values
array<string|int, mixed> —The passwordless session data.
sendSession()
Send a Passwordless Session via email.
public
sendSession(string $sessionId) : void
Parameters
- $sessionId : string
-
The unique identifier of the Passwordless Session.