valkyrie login uses these functions. A saved login is a LoginSession, and ValkyrieConfig picks it up when no access key is set.
device_login
Sign in to a Tracker with the OAuth device flow and return the new, unsaved login.announce(link, user_code) is called once with the page the user opens and the code they confirm there.
The call blocks until the login is approved, denied or expires. Call save() and remember() on the
result to keep it. Raises ValkyrieConfigError when the login service refuses or the code expires, and
ValkyrieTransportError when the Tracker or login service can’t be reached.
Signature
Parameters
required · str
required · Callable[[str, str], None]
optional · float · default:
optional · httpx.BaseTransport | None · default:
Returns
LoginSession
SessionAuth
Send requests as a saved login, refreshing it before it expires and saving the rotated tokens. Pass it asValkyrieClient(auth=SessionAuth(session)) to act as that login even when VALKYRIE_API_KEY is set.
Signature
Parameters
required ·
LoginSession
