> For the complete documentation index, see [llms.txt](https://docs.fortifiedid.se/use-cases/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.fortifiedid.se/use-cases/troubleshooting/wrong-relaystate.md).

# Wrong relaystate

## 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>
