# Wrong relaystate

Documentation owner: unversioned-area `use-cases`; documentation version: unversioned.
Source: `content/use-cases/troubleshooting/wrong-relaystate.md` at commit `eaf7a020437971baeee95e87eaf963636040ac71`.

## Incorrect RelayState Warning

### Error Log

You may encounter the following warning in `server.log`:

```
[AuthenticatorHandler] WARN: Incorrect RelayState value detected.
```

### Solution

#### Enable Session Cookie Support in "AuthN" Module

To address this issue, enable session cookie support by implementing these attributes:

* `"http_session_cookie_secure"`: Set to `true` to ensure cookies are transmitted over secure connections.
* `"http_session_cookie_same_site"`: Set to `"NONE"` to mitigate CSRF attacks without restrictions.

### Configuration Example

In `config.json`, add the cookie attributes in the AuthN section:

```json
"name": "AuthN",
"enabled": true,
"config": {
    "context_path": "/saml/authn",
    "http_session_cookie_secure": true,
    "http_session_cookie_same_site": "NONE",
    "webroot_dir": "web"
}
```

<br>
