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

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

Closed
1 task done
SagePtr opened this issue May 2, 2019 · 1 comment
Closed
1 task done

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

SagePtr opened this issue May 2, 2019 · 1 comment
Labels
Milestone

Comments

@SagePtr
Copy link
Contributor

SagePtr commented May 2, 2019

  • 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

@SagePtr
Copy link
Contributor Author

SagePtr commented May 2, 2019

I found place in code where Scratch Token is generated twice (new one overwrite old one, but old is outputed), if noone is working on this issue - i'll fix and PR in few hours.

SagePtr added a commit to SagePtr/gitea that referenced this issue May 2, 2019
@lafriks lafriks added this to the 1.8.1 milestone May 2, 2019
@SagePtr SagePtr closed this as completed May 2, 2019
@go-gitea go-gitea locked and limited conversation to collaborators Nov 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants