> For the complete documentation index, see [llms.txt](https://totalsoft.gitbook.io/graphql-rocket-generator/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://totalsoft.gitbook.io/graphql-rocket-generator/built-in-architecture/authentication.md).

# Authentication

This GraphQL server is expecting that all the applications and services that consumes him, uses an **Identity server** that generates secure *jwk authentication tokens.*

Our server defines a middleware function that decodes the token and validate it against the Identity server on every request using the following libraries: [jsonwebtoken](https://github.com/auth0/node-jsonwebtoken) and [jwks-rsa](https://github.com/auth0/node-jwks-rsa).

In order to connect your new application to an identity server, the following configuration variables must be filled in `.env` file:

```
IDENTITY_API_URL -> Identity API url, your Identity server API url 
IDENTITY_AUTHORITY -> Identity authority
IDENTITY_OPENID_CONFIGURATION -> Identity openId configuration
```
