Skip to main content
Version: 2.0.0

Connect Your Authentication enables simple authorization management by working seamlessly with most authentication providers. This integration allows for a smooth transition between verifying a user's identity and managing their access within your application. The process happens in a part we call the "handoff point" which occurs immediately after authentication and just before granting thr user access to the application.

This document outlines the steps required to ensure a successful integration, focusing on session management, JWT token issuance, user synchronization, and role assignment.

Session Management and JWT Token Issuance

Upon successful authentication, two key components are created for the user: a session and a JSON Web Token (JWT). The JWT is especially crucial as it encapsulates the user's unique identity. This token not only serves as a bearer of identity but also is important in you being able to synchronize the user's details inside of and assigning them a specific role based on predefined policies.

The Handoff Point

The handoff point is a middleware layer that you should create to facilitate the transition from authentication to authorization. It operates as follows:

  1. Authentication Confirmation: The user's identity is confirmed by the authentication provider.
  2. Session and JWT Issuance: A session is established, and a JWT containing the user's unique identity is issued.
  3. User Synchronization: The JWT is used to sync the user's identity into as a new user entity.
  4. Role Assignment: Based on the application's policy, a relevant role is assigned to the newly synchronized user.

User Synchronization and Role Assignment requires the user's unique identity to be integrated into its system to manage authorization effectively. This integration can occur in real-time or in bulk via the API.

  • Real-time Synchronization: At the handoff point, the user's identity is extracted from the JWT and synchronized with, where a corresponding user entity is created.
  • Bulk Synchronization: For scenarios requiring the synchronization of multiple users at once, offers an API endpoint to facilitate bulk user creation and role assignment.

API Endpoints

Monitoring Monthly Active Users measures usage through what we call Monthly Active Users (MAUs), which are unique identities against which permissions are checked within a given month.


Regardless of the number of permission checks performed for a user per month, they are counted as a single MAU (single identity).

Bulk User Synchronization with

Integrating an existing user base into Permit efficiently, especially when dealing with a significant number of users, requires a structured approach to bulk user synchronization. This method ensures that your users are seamlessly imported into, enabling immediate application of authorization policies and role assignments.

Understanding Bulk Synchronization

Bulk synchronization involves uploading a large number of user identities to in a single operation. This process is essential for applications transitioning to for authorization management or when periodically syncing user databases to ensure all user records are up-to-date.

When to Use Bulk Synchronization

  • Initial Integration: When first integrating with and you need to sync an existing user base.
  • Periodic Updates: To ensure that any changes in the user database (new users, role changes, etc.) are reflected in

Step-by-Step Bulk Synchronization Process

  1. Prepare User Data: Organize your user data, ensuring each user's unique identity and any relevant attributes (e.g., roles, permissions) are accurately represented.

  2. Format Data: Convert your user data into the format required by's bulk API endpoint. This often involves structuring the data into JSON or another specified format.

  3. API Call: Utilize the API to submit your bulk user data. The specific endpoint and method will be detailed in the API documentation. Ensure that your API request includes all necessary authentication and headers.

    Example endpoint: POST{proj_id}/{env_id}/bulk/users

  4. Handle Responses: Upon submitting your bulk upload, handle the API response. Success responses will confirm the data has been processed. Error responses should be reviewed to identify and correct any issues with the data or request.

  5. Verify Synchronization: After a successful upload, verify that the users have been correctly synchronized to by performing a test query or using the dashboard.