使用Selenium / Python自动进行两步身份验证吗?

问题描述 投票:0回答:1

我尝试安装“ Google身份验证”和“身份验证”以使用两步验证,但两者都没有给我TOTP密钥...

我找到的输入6位数字的代码here

我尝试使用this获取所有TOTP密钥,但收到:'secret = undefined'

我需要什么?我需要某种方法来获得6位认证,或者需要某种方法来简单地获得TOTP密钥,因为我只需要在代码中实现它即可。

有人知道我该怎么做吗?我正在使用Python + Selenium

python selenium authentication google-authentication
1个回答
0
投票

尝试下面的简单代码,并检查您是否提供了正确的机密。

from pyotp import *
totp = TOTP("16 chars secret code goes here")
token = totp.now()
print (token)
© www.soinside.com 2019 - 2024. All rights reserved.