forked from mirrors/gecko-dev
Bug 1866233 - Open the web browser when the token needs to be refreshed. r=sheehan
Differential Revision: https://phabricator.services.mozilla.com/D194472
This commit is contained in:
parent
ae937fe800
commit
a510d60572
1 changed files with 6 additions and 0 deletions
|
|
@ -14,6 +14,7 @@ import configparser
|
|||
import json
|
||||
import os
|
||||
import time
|
||||
import webbrowser
|
||||
from dataclasses import (
|
||||
dataclass,
|
||||
field,
|
||||
|
|
@ -234,6 +235,11 @@ class Auth0Config:
|
|||
auth_msg = f"Auth0 token validation required at: {device_code_data['verification_uri_complete']}"
|
||||
build.notify(auth_msg)
|
||||
|
||||
try:
|
||||
webbrowser.open(device_code_data['verification_uri_complete'])
|
||||
except webbrowser.Error:
|
||||
print("Could not automatically open the web browser.")
|
||||
|
||||
device_code_lifetime_s = device_code_data["expires_in"]
|
||||
|
||||
# Print successive periods on the same line to avoid moving the link
|
||||
|
|
|
|||
Loading…
Reference in a new issue