Passage Elements

Instantly add authentication to any website with Passage custom elements
The Passage Elements are the easiest way to use Passage in your web application. An Element is a modular component that provides a complete UI/UX for modern authentication, embedded directly into your website. The Elements work in any modern frontend framework and you can see a guide for your specific framework here.

What's Included?

🙆 User login, registration, and profile cross-platform elements.
🎨 Complete UI/UX for all device types and auth flows – in other words, it just works.
🔒 Device-native biometric authentication (e.g. Apple Face ID, Windows Hello, etc.).
✨ Magic Link authentication for a seamless non-biometric fallback.



Install the Passage-Elements package through NPM:
npm i --save @passageidentity/passage-elements
Then import the package in the module where you intend to use the custom element and import the specific element you wish to use.
import '@passageidentity/passage-elements/passage-auth'
import '@passageidentity/passage-elements/passage-login'
import '@passageidentity/passage-elements/passage-register'
import '@passageidentity/passage-elements/passage-profile'


Include the Passage JavaScript library on your website. Add the following line to the same page where you added the custom element above:
<script src="" defer></script>

Using a Passage Element

To use the Passage Auth Element, begin by adding the following custom HTML element wherever you want a login and registration prompt to live on your website:
<passage-auth app-id="<PASSAGE_APP_ID>"></passage-auth>
Your <PASSAGE_APP_ID>can be located in the Passage Console. If you don't have an App ID, you can create one in 60 seconds. Create an App →
For example, your login page might have the following structure:
<title>Login to My Website</title>
<script src="" defer></script>
<passage-auth app-id="<PASSAGE_APP_ID>"></passage-auth>

Optional Attributes

Used to set the default country when a user enters a phone number. The value should be a string that represents an ISO country code. If no value is passed it will default to "us".
<passage-auth app-id="<PASSAGE_APP_ID>" default-country-code="de"></passage-auth>

Styling the Passage Elements

The Passage Elements can be customized using CSS variables. You can modify the default configuration of the Passage Elements to match your site's look and feel. You can find detailed instructions and examples with the link below.