Python
Authenticate requests and manage Passage users with Python.
Prerequisites
Passage App ID and API Key from Passage Console
Install
Install the passage-identity (opens in a new tab) package.
pip install passage-identity
To learn more, see our Passage Python 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.
authenticateRequest() (opens in a new tab)
Deprecated use validateJwt() instead.
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)
signOut() (opens in a new tab)
Deprecated use revokeUserRefreshTokens() instead.
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.
deleteUserDevice() (opens in a new tab)
listUserDevices() (opens in a new tab)
Creating magic links
The Python SDK can be used to 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.