Skip to main content
OIDC login is handled by the web service (the authentication module) inside every Ayakaleaf Pro pod. It has no background job and no separate pod. The provider side (client, redirect URIs, admin claim) is the same as on the Toolkit, so set up your OpenID Provider (OP) with OIDC Authentication first, then put the values into Kubernetes as below.

Where things run

Configuration

1

Register Overleaf at the OP

Allow these addresses in your OP, built from OVERLEAF_SITE_URL:Find the five URLs in the OP’s discovery document as described in Finding the values with the discovery document.
2

Add the settings to the ConfigMap

Add to overleaf-env (30-config.yaml, or 60-config.yaml for several replicas):
30-config.yaml (additions)
EXTERNAL_AUTH takes a space-separated list, for example ldap oidc. See Environment Variables for every OVERLEAF_OIDC_* setting; all of them go into the ConfigMap except the client secret.
Quote "true" and "false": a ConfigMap only holds strings. A key set to "" is not the same as a missing key: OVERLEAF_OIDC_ALLOWED_EMAIL_DOMAINS: "" turns off account creation at the first login, while leaving the key out allows every domain.
3

Put the client secret into the Secret

4

Trust a private CA (optional)

If the OP’s certificate comes from your own CA, add the CA to the Secret overleaf-certs mounted at /var/lib/overleaf/certs (see Certificates and other files) and point Node.js at it:
5

Apply and restart

Then check that every pod reaches the token endpoint. The pods call it, not the browser, so a firewall or DNS problem shows up only here:
Any HTTP status (405 for a GET) means the endpoint is reachable; 000 means it is not.

Several replicas

Nothing extra. The state value of a login and the ID token used for logout are kept in the session, which lives in Redis, so the callback works on whichever replica receives it.

Tested on Kubernetes

With goauthentik as the OP, on Kubernetes 1.37 with three replicas behind HAProxy, our end-to-end tests for OIDC pass (35 cases): login, and logout through the OP; the admin mapping by group, by email and by a single value, and without mapping; name and admin flag updated at each login; linking and unlinking accounts; password reset and password changes of OIDC accounts; suspended accounts; OVERLEAF_OIDC_ALLOWED_EMAIL_DOMAINS; OVERLEAF_DISABLE_LOCAL_LOGIN; and OIDC together with public access.

Q&A

Answer: The browser did not send the session cookie back with the callback. On Kubernetes the usual causes are:
  • OVERLEAF_SECURE_COOKIE is set, but users open the site over plain HTTP, so the browser never stores the cookie. Any value of OVERLEAF_SECURE_COOKIE, even "false", turns secure cookies on; remove the key instead.
  • The site is opened under another address than OVERLEAF_SITE_URL.
  • Behind HTTPS, your ingress or load balancer does not send X-Forwarded-Proto: https, or its address is missing from OVERLEAF_TRUSTED_PROXY_IPS.
Answer: In the web log of the pod that served the request, not in kubectl logs:
With several replicas, check each overleaf-N.
Last modified on November 2, 2026