📄️ 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 NodeJS application, a Python web app or a PHP website, you can easily integrate CentralAuth into your project. We will be using NextJS 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 NextJS 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 NodeJS application, you can use the official CentralAuth NPM library. Install it using the following command:
📄️ Configuration
CentralAuth NPM library
🗃️ Starting the authentication flow
4 items
📄️ Handling the callback
CentralAuth NPM library
📄️ Getting the user info
CentralAuth NPM library
📄️ 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
When starting the login flow, you can pass an object with translations as a query parameter. This allows you to override or translate the default strings on the login pages.
📄️ 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.