# 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="/files/80aR1qlpPAwsUXL6iFGF" 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="/files/kDYDWay2LXJfiPmWToZe" 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="/files/X5Y4n73XN2tIuRfnIjwb" 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="/files/g4NO6qFeg1ApGfW6RfUr" 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="/files/cbHJPam4lB6TfZTa1IKk" 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="/files/N1wi5kJ6Z25gAo3wXQJD" 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="/files/cJua69oP67E7pX3Ch4Vi" 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="/files/2J2cSze2h0B7UhtIvWLs" 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="/files/4mknI7DA6W7th1UU7bn5" 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: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

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

The question should be specific, self-contained, and written in natural language.
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.
