Skip to content

2FA scratch token is wrong, but regenerated tokens are good #6832

@SagePtr

Description

@SagePtr
  • Gitea version (or commit ref): 1.8.0, ade88a8
  • Git version: any
  • Operating system: any
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (can't provide URL)
  • Log gist:

Description

When you enable 2FA, new scratch token is generated and printed in message "Your account has been enrolled into two-factor authentication. Store your scratch token (XXXXXXXX) in a safe place as it is only shown once!".
But for some reason this token is wrong and can't be used, invalid token message appears.
But if you generate new scratch-token, it will be okay and can be used as scratch-token. And message is "Your scratch token is now XXXXXXXX. Store it in a safe place."

Screenshots

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions