> For the complete documentation index, see [llms.txt](https://kb.stoque.com.br/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://kb.stoque.com.br/zeev/formula-zeev/configuracoes-iniciais/definir-formas-de-autenticacao/como-configurar-a-autenticacao-externa-jwt/tratamento-de-erros-de-login-jwt.md). Agents can also search and read this documentation through its [MCP server](https://kb.stoque.com.br/~gitbook/mcp).

# Tratamento de erros de login JWT

<details>

<summary>Parâmetro "username" incorreto</summary>

**Erro:** 401 - "Não foi encontrada nenhuma pessoa com os dados de identificação enviados."\
**Possível solução:** ajustar o username.

<figure><img src="https://3371003943-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MD66pBdRalAQgnhNstG%2Fuploads%2FuU73LFUvrilprmEhvlGs%2Fimage.png?alt=media&amp;token=91fbc4b7-ce4f-46b2-ad8c-6d9de0925763" alt=""><figcaption></figcaption></figure>

**Erro:** 401 - "O login do usuário do token JWT (username) é inválido."\
**Possível solução:** O parâmetro "username" foi digitado incorretamente no código.

<figure><img src="https://3371003943-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MD66pBdRalAQgnhNstG%2Fuploads%2FeAWYUndQWGnclUDC97H9%2Fimage.png?alt=media&amp;token=6ce655db-fefa-4607-9dde-ced56d426d93" alt=""><figcaption></figcaption></figure>

</details>

<details>

<summary>Parâmetro "iat" incorreto</summary>

**Erro:** 401 - "A data de emissão do token JWT (iat) é inválida."\
**Possível solução:** O parâmetro "iat" foi digitado incorretamente no código.

<figure><img src="https://3371003943-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MD66pBdRalAQgnhNstG%2Fuploads%2Fs1o94JJbdSEzBwzwGHc4%2Fimage.png?alt=media&amp;token=0d546585-64ad-4af0-a4c5-936f2abf8641" alt=""><figcaption></figcaption></figure>

**Erro:** 401 - "O token JWT é muito antigo."\
**Possível solução:** O Timestamp não foi gerado no momento do login ou está inválido.

<figure><img src="https://3371003943-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MD66pBdRalAQgnhNstG%2Fuploads%2FJ0MZ0N38cEoCEY8qf44g%2Fimage.png?alt=media&amp;token=334d27f0-a114-4ca9-9452-87005a0f0b8f" alt=""><figcaption></figcaption></figure>

**Erro:** 401 - "A data de emissão do token JWT (iat) é inválida."\
**Possível solução:** O Timestamp é considerado inválido por ser uma data futura (possível troca entre parâmetro **iat** e **exp**).

<figure><img src="https://3371003943-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MD66pBdRalAQgnhNstG%2Fuploads%2FCz1V8esKC5MCyu15y35T%2Fimage.png?alt=media&amp;token=ef719c54-5e47-48db-9446-fceb83838a9f" alt=""><figcaption></figcaption></figure>

</details>

<details>

<summary>Parâmetro "exp" incorreto</summary>

**Erro:** 401 - "A data de expiração do token JWT (exp) é inválida."\
**Possível solução:** O parâmetro "exp" foi digitado incorretamente no código.

<figure><img src="https://3371003943-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MD66pBdRalAQgnhNstG%2Fuploads%2FKfVgHCdjgPiH7RfnNAph%2Fimage.png?alt=media&amp;token=96ffe0ec-d873-4b0a-b8be-440dd32ea79b" alt=""><figcaption></figcaption></figure>

**Erro:** 401 - "O token JWT está expirado."\
**Possível solução:** O Timestamp está indicando que o token está expirado. Verificar se há troca de parâmetros ou se o token não foi gerado novamente.

<figure><img src="https://3371003943-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MD66pBdRalAQgnhNstG%2Fuploads%2FkeTqFyCwJGa8Ku8lwcmX%2Fimage.png?alt=media&amp;token=c54b917a-bee4-458a-8cd8-ef94a9545f91" alt=""><figcaption></figcaption></figure>

</details>

<details>

<summary>Parâmetro "iss" incorreto</summary>

**Erro:** 401 - "O emissor do token JWT (iss) é inválido."\
**Possível solução:** O parâmetro "iss" foi digitado incorretamente no código, ou o endereço está incorreto.

<figure><img src="https://3371003943-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MD66pBdRalAQgnhNstG%2Fuploads%2FwMfxZ7aRIBgeqeYXpW9e%2Fimage.png?alt=media&amp;token=4fd218fb-4da9-4914-85e6-ba623943813e" alt=""><figcaption></figcaption></figure>

**Erro:** 401 - "Os parâmetros de autenticação externa não foram localizados."\
**Possível solução:** O endereço indicado no parâmetro está diferente do endereço indicado como URL de autenticação nas configurações do Zeev.

<figure><img src="https://3371003943-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MD66pBdRalAQgnhNstG%2Fuploads%2F1iGjtzajUJj8HBIeuhzX%2Fimage.png?alt=media&amp;token=1baa22d9-4a71-4fb1-a669-ac5f8d4f78f9" alt=""><figcaption></figcaption></figure>

</details>

<details>

<summary>Parâmetro "aud" incorreto</summary>

**Erro:** 401 - "A audiência do token JWT (aud) é inválida."\
**Possível solução:** O parâmetro "aud" foi digitado incorretamente no código, ou a audiência indicada está incorreta.

</details>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://kb.stoque.com.br/zeev/formula-zeev/configuracoes-iniciais/definir-formas-de-autenticacao/como-configurar-a-autenticacao-externa-jwt/tratamento-de-erros-de-login-jwt.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
