style: move secrets import alongside other function-level imports
Group the secrets import with time and webbrowser at the top of run_hermes_oauth_login_pure(), matching the existing pattern. Drop the _secrets alias — no name conflict in this scope.
This commit is contained in:
@@ -1060,12 +1060,12 @@ def _generate_pkce() -> tuple:
|
|||||||
|
|
||||||
def run_hermes_oauth_login_pure() -> Optional[Dict[str, Any]]:
|
def run_hermes_oauth_login_pure() -> Optional[Dict[str, Any]]:
|
||||||
"""Run Hermes-native OAuth PKCE flow and return credential state."""
|
"""Run Hermes-native OAuth PKCE flow and return credential state."""
|
||||||
|
import secrets
|
||||||
import time
|
import time
|
||||||
import webbrowser
|
import webbrowser
|
||||||
|
|
||||||
verifier, challenge = _generate_pkce()
|
verifier, challenge = _generate_pkce()
|
||||||
import secrets as _secrets
|
oauth_state = secrets.token_urlsafe(32)
|
||||||
oauth_state = _secrets.token_urlsafe(32)
|
|
||||||
|
|
||||||
params = {
|
params = {
|
||||||
"code": "true",
|
"code": "true",
|
||||||
|
|||||||
Reference in New Issue
Block a user