Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LOR 108 feature: set new password #11

Merged

Conversation

viniciuscosmome
Copy link
Contributor

Mudanças

Cria uma rota para receber a nova senha e o token de autorização. Antes de realizar a alteração da senha, o token é validado para verificar se é o mesmo que está salvo na base de dados e se ainda é um token com o tempo de expiração válido (5 min).

Novas rotas

Receber e definir nova senha

  • rota: /auth/set-password
  • método: POST
  • corpo da requisição
type body = {
  password: string;
  recoveryToken: string;
}
  • resposta em caso de sucesso
type response = {
  statusCode: 200;
  message: 'Senha redefinida com sucesso!'
}
  • resposta em caso de erro
type response = {
  statusCode: 400 | 500;
  message: string | Array<string>;
}

@viniciuscosmome viniciuscosmome added the enhancement New feature or request label Sep 15, 2023
@viniciuscosmome viniciuscosmome self-assigned this Sep 15, 2023
@viniciuscosmome viniciuscosmome merged commit 843dfff into loryblu:develop Sep 16, 2023
1 check passed
@viniciuscosmome viniciuscosmome deleted the feature/set-new-password branch September 16, 2023 00:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants