Ruby

Authenticate requests and manage Passage users with Ruby.

Prerequisites

Passage App ID and API Key from Passage Console.

Install

Install the passageidentity (opens in a new tab) gem.

gem install passageidentity

To learn more, see our Passage Ruby 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.

auth.authenticate_request() (opens in a new tab)

Deprecated use auth.validate_jwt() instead.

auth.revoke_user_refresh_tokens() (opens in a new tab)

auth.validate_jwt() (opens in a new tab)

App

Retrieve information about the Passage app.

get_app() (opens in a new tab)

User Management

Users of the app can be managed, all are reflected on the app's Users page in Passage Console. Users can be correlated between Passage and your database. Learn more about database management.

user.activate() (opens in a new tab)

user.create() (opens in a new tab)

user.deactivate() (opens in a new tab)

user.delete() (opens in a new tab)

user.get() (opens in a new tab)

user.get_by_identifier() (opens in a new tab)

user.update() (opens in a new tab)

user.signout() (opens in a new tab)

Deprecated use auth.revoke_user_refresh_tokens() 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.

user.delete_device() (opens in a new tab)

user.list_devices() (opens in a new tab)

Creating Magic Links

The Ruby 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.

create_magic_link() (opens in a new tab)