mirror of
https://github.com/donaldzou/WGDashboard.git
synced 2025-08-12 00:22:23 +00:00
Update dashboard.py
Fixed the issue where TOTP Key is not actually reset when reset.
This commit is contained in:
parent
bf33a70727
commit
f2d4ff6dc4
@ -2957,7 +2957,7 @@ def API_isTotpEnabled():
|
||||
@app.get(f'{APP_PREFIX}/api/Welcome_GetTotpLink')
|
||||
def API_Welcome_GetTotpLink():
|
||||
if not DashboardConfig.GetConfig("Account", "totp_verified")[1]:
|
||||
DashboardConfig.SetConfig("Account", "totp_key", pyotp.random_base32())
|
||||
DashboardConfig.SetConfig("Account", "totp_key", pyotp.random_base32(), True)
|
||||
return ResponseObject(
|
||||
data=pyotp.totp.TOTP(DashboardConfig.GetConfig("Account", "totp_key")[1]).provisioning_uri(
|
||||
issuer_name="WGDashboard"))
|
||||
|
Loading…
x
Reference in New Issue
Block a user