Auth: remember-me with two-factor sign-in and the session ID (3.2.0)

Aberta Para iniciantes
#196 0 comentários 0 reações 0 responsáveis Ver no GitHub

Mantenedores costumam responder em até 1 dia

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
2/5
Tempo estimado
1-3 horas
Facilidade para iniciantes
73/100
Tipo de issue
Documentação
Clareza
Claramente especificada
Status de atividade
Ativa
Stack de tecnologia
php

Direção de pesquisa

Comece pelos três arquivos indicados: v3.0/packages/auth/adapters.md, v3.0/packages/auth/usage.md e v3.0/upgrade-guide.md; confira o texto atual em relação ao comportamento do adaptador de autenticação na versão 3.2.x descrito na issue e à alteração do framework vinculada. Atualize a documentação sobre o adaptador de sessão, o fluxo de dois fatores e a atualização da versão 3.1 para a 3.2. O trabalho estará concluído quando todos os comportamentos listados e as orientações para limpar os tokens antes da atualização estiverem documentados corretamente; mantenha as alterações em staging até o lançamento da versão 3.2.0.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

Summary

Framework 3.2.0 changes the session auth adapter (quantum-php/framework#707):

  • With two-factor authentication on, the remember-me token and cookie are issued only after verifyOtp() accepts the OTP, in the browser that asked for "remember me". signin() issued them before the OTP step. A sign-in without "remember me", and signout(), drop a pending request.
  • verifyOtp() and a sign-in through the remember cookie (user()) regenerate the session ID, as signin() without two-factor authentication does.
  • Remember tokens issued before the upgrade are not revoked; applications clear them to sign remembered browsers out.

The docs still say the remember token is issued at signin() and list session regeneration only for a sign-in without two-factor authentication.

Changes

  1. v3.0/packages/auth/adapters.md, session adapter:
    • "What it does" (:16-22): the session ID is also regenerated after the OTP and when the remember cookie signs a user in.
    • "Remember-me behavior" (:24-40): with two-factor on, the token and cookie come after verifyOtp(), only in the browser that asked; a sign-in without "remember me" and signout() drop the request.
    • "Two-factor caveat" (:42-46): what signin() returns, when the cookie is set, and that a pending OTP still blocks the cookie.
  2. v3.0/packages/auth/usage.md, "Two-factor flow" (:40-61): with "remember me", the cookie is set when the OTP is verified, and the user gets a new session ID.
  3. v3.0/upgrade-guide.md, "Upgrading from 3.1 to 3.2": a short section on remember tokens issued before the upgrade (how to clear them) and the new session ID after the OTP.

Every statement is checked against the 3.2.x code. The changes wait in staging until 3.2.0 is released.

Related

  • quantum-php/framework#707, PR quantum-php/framework#713
Linguagem predominante
Sem dados de linguagem
Estrelas
3
Forks
1
Merge médio
2min
PRs com merge (30d)
27

Preparar o ambiente

Este projeto não oferece contêiner de desenvolvimento, Dockerfile nem guia de contribuição, então a configuração fica por sua conta: comece pelo README e veja nosso guia da primeira contribuição para os passos gerais.

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de quantum-php/docs

Todas as issues de quantum-php/docs

Issues semelhantes

Mais issues de Security

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.