PHP

Authenticate requests and manage Passage users with PHP.

Prerequisites

Passage App ID and API Key from Passage Console

Install

Install the passageidentity/passage-php (opens in a new tab) package.

composer require passageidentity/passage-php

To learn more, see our Passage PHP Complete Github repository with up to date requirements and installation steps.

Session management

Passage uses two types of tokens: auth tokens and refresh tokens for security. To learn more, see our full guide on tokens.

revokeUserRefreshTokens() (opens in a new tab)

validateJWT() (opens in a new tab)

App

Retrieve information about the Passage app.

getApp() (opens in a new tab)

User management

Users of the app can be managed, all are reflected on the app's Users page in Console. To learn more about user management and correlating users between Passage and your database view our guide here.

activateUser() (opens in a new tab)

createUser() (opens in a new tab)

deactivateUser() (opens in a new tab)

deleteUser() (opens in a new tab)

getUser() (opens in a new tab)

getUserByIdentifier() (opens in a new tab)

updateUser() (opens in a new tab)

User passkey device management

When a user creates a passkey, the device is saved. Devices can be retrieved and deleted from the user's profile.

deleteUserDevices() (opens in a new tab)

listUserDevices() (opens in a new tab)

Creating Magic Links

Generate custom Magic Links for users that can be embedded into any content medium. To learn more, see our full guide on Embedded Magic Links.

createMagicLink() (opens in a new tab)