Skip to content

Passkey Complete for Python - Integrate into your Python API or service to enable a completely passwordless standalone auth solution with Passage by 1Password

License

Notifications You must be signed in to change notification settings

passageidentity/passage-python

Repository files navigation

passage-python

PyPI version Python GitHub License Static Badge

About

Passage by 1Password unlocks the passwordless future with a simpler, more secure passkey authentication experience. Passage handles the complexities of the WebAuthn API, and allows you to implement passkeys with ease.

Use Passkey Flex to add passkeys to an existing authentication experience.

Use Passkey Complete as a standalone passwordless auth solution.

Use Passkey Ready to determine if your users are ready for passkeys.

In passage-python

Use passage-python to implement Passkey Complete into your Python backend to authenticate requests and manage users.

Product Compatible
Passkey Flex Passkey Flex ✖️ For Passkey Flex, check out the Passkey Flex APIs
Passkey Complete Passkey Complete
Passkey Ready Passkey Ready ✖️ For Passkey Ready, check out Authentikit

Getting Started

Check Prerequisites

You'll need a free Passage account and a Passkey Complete app set up in Passage Console to get started.
Learn more about Passage Console →

Install

Install this package using pip.

pip install passage-identity

Import

from passageidentity import Passage
import os

Initialize

Passage has three arguments that can be used for initialization: app_id, api_key, and auth_strategy.

  • app_id is the Passage App ID that specifies which app should be authorized. It has no default value and must to be set upon initialization.
  • api_key is an API key for the Passage app, which can be generated in the 'App Settings' section of the Passage Console. It is an optional parameter and not required for authenticating requests. It is required to get or update user information.
  • Deprecated auth_strategy defines where the Passage SDK should look for the authentication token. It is set by default to Passage.COOKIE_AUTH, but can be changed to Passage.HEADER_AUTH.
PASSAGE_APP_ID = os.environ.get("YOUR_PASSAGE_APP_ID")
PASSAGE_API_KEY = os.environ.get("YOUR_PASSAGE_API_KEY")

psg = Passage(PASSAGE_APP_ID, PASSAGE_API_KEY)

Go Passwordless

Find all core functions, user management details, and more implementation guidance on our Passkey Complete Python Documentation page.

API Reference

Method Description
activateUser Activate User
deactivateUser Deactivate User
deleteUser Delete User
deleteUserDevice Delete User Device
authenticateRequest Validates user jwt token
createMagicLink Create Embeddable Magic Link
createUser Create User
deleteUserDevice Delete a device for a user
getApp Get App
getUser Get User
getUserByIdentifier Get User By Identifier
listUserDevices List User Devices
revokeUserDevice Deprecated Delete User Device
revokeUserRefreshTokens Signout User
signOut Deprecated Signout User
updateUser Update User
validateJwt Validates user jwt token

Support & Feedback

We are here to help! Find additional docs, the best ways to get in touch with our team, and more within our support resources.



Passage by 1Password Logo

Passage is a product by 1Password, the global leader in access management solutions with nearly 150k business customers.
This project is licensed under the MIT license. See the LICENSE file for more info.