📄️ Introduction
Welcome to the CentralAuth Documentation for developers!
📄️ Overview
This graph shows the CentralAuth login flow. It illustrates the interaction between your application and the CentralAuth service, including the authentication process and user redirection.
📄️ Getting started
CentralAuth is compatible with any application that supports OAuth 2.0. Whether you're building a Node.js application, a Python web app or a PHP website, you can easily integrate CentralAuth into your project. We will be using Next.js for the examples in this documentation, but the concepts and steps are applicable to any programming language or framework.
📄️ Quick example
First, we will be showing a quick example of how to use the CentralAuth NPM library in a Next.js application. This will give you a good idea of how to use the library and what it can do. After that, we will go into more detail about the different features and how to use them.
📄️ Installation
You can use any OAuth 2.0 library to integrate CentralAuth into your application. If you are using a Node.js application, you can use the official CentralAuth NPM library. Install it using the following command:
📄️ Configuration
Configuration of your application depends on the type of application you are developing, a web application or a native Android or iOS app.
🗃️ Starting the authentication flow
4 items
📄️ Handling the callback
The way you handle the callback after authentication depends on the type of application you are developing, a web application or a native Android or iOS app.
📄️ Getting the user info
CentralAuth NPM library
📄️ Caching
Normally the user info is fetched from the CentralAuth server on every request. This can lead to performance issues and increased latency, especially when the user info is requested multiple times in a short period of time. To mitigate this, you can enable caching of the user info.
📄️ Logging out
CentralAuth NPM library
📄️ Error handling
When interacting with the CentralAuth API, any request that fails will return a JSON object with error information. The error object will contain the following properties:
📄️ Translations
Translation are not available on the Free plan.
📄️ CentralAuth API
You can use the official CentralAuth API for an advanced integration between your application and CentralAuth. The CentralAuth API is a RESTful API that allows you to perform various operations, such as managing tenants, organizations and users. To use the API, you need an API key from your tenant or organization and set it as a Bearer token in the Authorization header of your requests.
🗃️ Examples
3 items