Cookie-based (Website or Single-page app)

Authenticate incoming request by cookie in the HTTP header.

By using Authgear, you can add a login to your website easily. Authgear supports various authentication methods, that you can easily turn on and configure in the portal.


To authenticate with cookies, you will need to set up a custom domain for Authgear, so that your website and Authgear are under the same root domains. e.g. Your website is, and Authgear with a custom domain

In this setting, if you have multiple applications under, all applications would share the same session cookies automatically.


How it works

Your app server will receive a request with the cookie

Verify request in your app server

To verify the requests in your app server, you must Forward authentication to Authgear Resolver Endpoint.

Request example

> GET /api_path HTTP/1.1
> Host:
> cookie: session=<AUTHGEAR_SESSION_ID>

Get Started

The following tutorials show you how to add user login to your website using Authgear.

1. Frontend Integration

JavaScript (Web)

2. Backend Integration

Backend Integration

Last updated