双重验证¶
双因素身份验证(“2FA”)是提高账户安全性的好方法,可以降低其他人代替您登录的可能性。
实际上,这意味着将密钥存储在*身份验证器*(通常是您的手机)中,并在您尝试登录时交换来自身份验证器的代码。
这意味着攻击者需要*两者*来猜测(或找到)您的密码并访问(或窃取)您的身份验证器,这比其中任何一个都更难。
需求¶
注解
这些列表只是示例,它们不是对任何特定软件的认可。
如果您还没有身份验证器,则需要选择身份验证器。
基于电话的身份验证器是最简单和最常见的,因此我们假设您将在手机上选择并安装一个,示例包括“Authy <https://authy.com/>”_,“FreeOTP <https://freeotp.github.io/>”_,“Google Authenticator <https://support.google.com/accounts/answer/1066447?hl=en>”_,“LastPass Authenticator <https://lastpass.com/auth/>”_,“Microsoft Authenticator <https://www.microsoft.com/en-gb/account/authenticator?cmp=h66ftb_42hbak>`_, …;密码管理器通常还包括:abbr:‘2FA(双因素身份验证)’支持,例如‘1Password <https://support.1password.com/one-time-passwords/>’_,’Bitwarden <https://bitwarden.com/help/article/authenticator-keys/>’_,…
为了演示,我们将使用Google身份验证器(不是因为它很好,而是因为它很常见)。
设置双重身份验证¶
一旦你有了你选择的身份验证器,转到你想要设置的Odoo实例:abbr:2FA(双因素身份验证)
,然后打开:guilabel:Preferences`(或:guilabel:`My Profile
):

打开 账户安全 选项卡,然后单击 启用双因素身份验证 按钮:

由于这是安全敏感操作,因此您需要输入密码:

之后,您将看到带有条形码的此屏幕:

在大多数应用中,您只需通过您选择的身份验证器*扫描条形码*,然后身份验证器将负责所有设置:

注解
如果您无法扫描屏幕(例如,因为您在身份验证器应用程序所在的同一手机上进行此设置),则可以单击提供的链接,或复制密钥以手动设置身份验证器:


完成此操作后,身份验证器应显示一个*验证码*,其中包含一些有用的识别信息(例如,代码所在的域和登录名):

现在,您可以将代码输入到 验证码 字段中,然后单击 :guilabel:`启用双因素身份验证`按钮。
恭喜,您的账户现在受到双因素身份验证的保护!

正在登录¶
您现在应该:guilabel:`注销`以跟随。
在登录页面上,输入您为其设置的账户的用户名和密码:abbr:2FA(双因素身份验证)
,而不是立即输入Odoo,您现在将获得第二个登录屏幕:

获取您的身份验证器,输入它为域和账户提供的代码,进行验证,您现在就进入了。
就是这样。从现在开始,除非您禁用:abbr:‘2FA(双因素身份验证)’,否则您将拥有两步登录过程,而不是旧的一步过程。
危险
不要丢失您的身份验证器,如果您这样做,您将需要一个*Odoo管理员*来禁用账户上的:abbr:‘2FA(双因素身份验证)’。