mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-06-12 16:56:02 +00:00
Feat/reset password (#1566)
* feat: reset password with recovery key * perf: formatting and multi language
This commit is contained in:
committed by
GitHub
parent
a8d03c98dc
commit
a01706d163
@@ -15,3 +15,10 @@ class GenKeysStage(stage.BootingStage):
|
||||
if not ap.instance_config.data['system']['jwt']['secret']:
|
||||
ap.instance_config.data['system']['jwt']['secret'] = secrets.token_hex(16)
|
||||
await ap.instance_config.dump_config()
|
||||
|
||||
if 'recovery_key' not in ap.instance_config.data['system']:
|
||||
ap.instance_config.data['system']['recovery_key'] = ''
|
||||
|
||||
if not ap.instance_config.data['system']['recovery_key']:
|
||||
ap.instance_config.data['system']['recovery_key'] = secrets.token_hex(3).upper()
|
||||
await ap.instance_config.dump_config()
|
||||
|
||||
Reference in New Issue
Block a user