mirror of
https://codeberg.org/davrot/forgejo.git
synced 2025-07-08 19:00:02 +02:00
Implements generator cli for secrets (#3531)
Signed-off-by: Codruț Constantin Gușoi <codrut.gusoi@gmail.com>
This commit is contained in:
parent
e59fe7c8d9
commit
96c268c0fc
12 changed files with 215 additions and 67 deletions
|
@ -16,7 +16,7 @@ import (
|
|||
|
||||
"github.com/pquerna/otp/totp"
|
||||
|
||||
"code.gitea.io/gitea/modules/base"
|
||||
"code.gitea.io/gitea/modules/generate"
|
||||
"code.gitea.io/gitea/modules/setting"
|
||||
"code.gitea.io/gitea/modules/util"
|
||||
)
|
||||
|
@ -33,7 +33,7 @@ type TwoFactor struct {
|
|||
|
||||
// GenerateScratchToken recreates the scratch token the user is using.
|
||||
func (t *TwoFactor) GenerateScratchToken() error {
|
||||
token, err := base.GetRandomString(8)
|
||||
token, err := generate.GetRandomString(8)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue