fixed GetTOTP, started rough QR code implementation
GetTOTP handles TOTP method retrieval for confirmation and deletion. QR code implementation looks like it's gonna suck, so might end up using a library for this later.
This commit is contained in:
parent
ad39e68cd6
commit
1edc051ae2
5 changed files with 132 additions and 13 deletions
2
main.go
2
main.go
|
@ -89,7 +89,6 @@ func main() {
|
|||
}
|
||||
username := os.Args[2]
|
||||
totpName := os.Args[3]
|
||||
secret := controller.GenerateTOTPSecret(controller.TOTP_SECRET_LENGTH)
|
||||
|
||||
account, err := controller.GetAccountByUsername(app.DB, username)
|
||||
if err != nil {
|
||||
|
@ -102,6 +101,7 @@ func main() {
|
|||
os.Exit(1)
|
||||
}
|
||||
|
||||
secret := controller.GenerateTOTPSecret(controller.TOTP_SECRET_LENGTH)
|
||||
totp := model.TOTP {
|
||||
AccountID: account.ID,
|
||||
Name: totpName,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue