Skip to main content
Every deployed Vybe app is protected by authentication. There are no public URLs — users must be authenticated members of your organization with appropriate access rights before they can reach your app. This page explains how the authentication flow works and how you can use the current user’s identity in your app code.

The authentication flow

When someone visits a deployed app, Vybe handles authentication automatically:
1

User visits the app URL

The user navigates to your deployed app at <app-slug>-<org-slug>.vybe.build.
2

Vybe checks authentication

The Vybe middleware checks whether the user has an active session (a valid authentication cookie).
3

Redirect to login (if needed)

If the user is not authenticated, they are redirected to the Vybe login page. After signing in, they are sent back to the original app URL.
4

Access check

Once authenticated, Vybe verifies that the user has access to this specific app based on the app’s access level and any user-level grants.
5

Token injection

If the user passes the access check, Vybe mints a short-lived Vybe User Token (VUT) and injects it — along with user identity headers — into the request before forwarding it to your app.
6

App receives the request

Your app receives the request with the user’s identity context available in the request headers.

Identifying the current user

When a request reaches your app, the current user’s email is available in the request headers. You can use this to personalize the app experience, filter data, or implement user-specific logic.

In an API route

In a server component

You do not need to build your own login page or session management. Vybe handles all of that for you. Just read the user identity from the request headers.

Two-factor request authentication

When your app makes API calls to Vybe services (for example, to access integration data or run data queries), the request is authenticated with two credentials:
  • App-level resources (like shared integration connections) require only the server secret.
  • User-level resources (like a user’s personal integration account) require both the server secret and the VUT.
This two-factor approach ensures that API calls are both app-authorized and user-authorized.

How this differs from traditional auth

In a traditional web app, you would build a login page, manage sessions, store user credentials, and handle password resets. In Vybe, all of this is handled by the platform:
Apps cannot be accessed publicly. All users must be authenticated members of your organization with appropriate access rights. There is no way to make a Vybe app publicly accessible.

Common patterns

Personal dashboard

Build an app where each user sees only their own data:

Role-based content

Combine user identity with your own role data to show different content:

What is next