jupyterhub / jupyterhub/nativeauthenticator

403 : Forbidden XSRF cookie does not match POST argument

Open
#290 16 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Python
Stars
81
Forks
68
PR merge metrics
No merged PRs in 30d

Description

### Bug description

Hi! I have successfully set up the JupyterHub on top of kubernetes. However, when I enable Native Authentication, and try to sign up as a new user, I get the error: `403 : Forbidden XSRF cookie does not match POST argument`.

I also reported the same issue here: https://github.com/jupyterhub/nativeauthenticator/issues/289

### How to reproduce

There is the basic configuration of hub using Helm `config.yaml` file:

```yaml
hub:
config:
JupyterHub:
authenticator_class: native
NativeAuthenticator:
open_signup: true
```

### My personal set up

* [Helm chart version](https://hub.jupyter.org/helm-chart/): `4.3.11`
* JupyterHub is served over HTTPS
* Ingress is set-up by cloud provider, not by `config.yaml` file

Here are some relevant logs:

Logs

```

[I 2025-11-22 13:55:38.478 JupyterHub _xsrf_utils:130] Setting new xsrf cookie for b'None:=' {'path': '/hub/', 'max_age': 3600}

[I 2025-11-22 13:55:38.494 JupyterHub log:192] 200 GET /hub/signup (@::ffff:) 16.94ms

[I 2025-11-22 13:55:54.403 JupyterHub _xsrf_utils:130] Setting new xsrf cookie for b'' {'path': '/hub/', 'max_age': 3600}

[W 2025-11-22 13:55:54.403 JupyterHub web:1932] 403 POST /hub/signup (::ffff:): XSRF cookie does not match POST argument

[W 2025-11-22 13:55:54.436 JupyterHub log:192] 403 POST /hub/signup (@::ffff:) 33.57ms

```

I cannot figure out any more relevant information. I tried to migrate to other Helm Chart versions, setting `JuputerHub: trusted_downstream_ips: []` and some configuration with `JupyterHub: tornado_settings:` in `config.yaml` file and deleting browser cookies, but nothing worked. Weirdly enough, Dummy Authentication and Google Authetnication work just fine.

Thanks for help in advance!!!

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.