File tree 1 file changed +6
-6
lines changed 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -2539,22 +2539,22 @@ def get_google_auth_password(self, totp_key=None):
2539
2539
If "totp_key" is not specified, defaults to using the one
2540
2540
provided in seleniumbase/config/settings.py
2541
2541
Google Auth passwords expire and change at 30-second intervals.
2542
- If the fetched password expires in the next 3 seconds, waits
2543
- for a fresh one before returning it (may take up to 3 seconds).
2542
+ If the fetched password expires in the next 1.5 seconds, waits
2543
+ for a new one before returning it (may take up to 1.5 seconds).
2544
2544
See https://pyotp.readthedocs.io/en/latest/ for details. """
2545
2545
import pyotp
2546
2546
if not totp_key :
2547
2547
totp_key = settings .TOTP_KEY
2548
2548
2549
2549
epoch_interval = time .time () / 30.0
2550
2550
cycle_lifespan = float (epoch_interval ) - int (epoch_interval )
2551
- if float (cycle_lifespan ) > 0.90 :
2552
- # Password expires in less than 3 seconds. Wait for a fresh one.
2553
- for i in range (60 ):
2551
+ if float (cycle_lifespan ) > 0.95 :
2552
+ # Password expires in the next 1.5 seconds. Wait for a new one.
2553
+ for i in range (30 ):
2554
2554
time .sleep (0.05 )
2555
2555
epoch_interval = time .time () / 30.0
2556
2556
cycle_lifespan = float (epoch_interval ) - int (epoch_interval )
2557
- if not float (cycle_lifespan ) > 0.90 :
2557
+ if not float (cycle_lifespan ) > 0.95 :
2558
2558
# The new password cycle has begun
2559
2559
break
2560
2560
You can’t perform that action at this time.
0 commit comments