forked from BasedHardware/omi
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path__init__.py
More file actions
25 lines (20 loc) · 900 Bytes
/
Copy path__init__.py
File metadata and controls
25 lines (20 loc) · 900 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
"""Authentication primitives for omi-cli.
Two flows are wired through this package:
* :mod:`omi_cli.auth.api_key` — paste-in dev API key (``omi_dev_*``). Primary
flow for agents, CI, and any headless context. Long-lived, scoped.
* :mod:`omi_cli.auth.oauth` — Firebase OAuth browser flow. Spins up a
localhost callback server, opens the browser, exchanges the resulting code
for a Firebase ID token + refresh token. Best for humans on a laptop.
Common token persistence lives in :mod:`omi_cli.auth.store`.
"""
from omi_cli.auth.api_key import login_with_api_key, validate_api_key_format
from omi_cli.auth.oauth import login_with_browser, needs_refresh, refresh_id_token
from omi_cli.auth.store import clear_credentials
__all__ = [
"clear_credentials",
"login_with_api_key",
"login_with_browser",
"needs_refresh",
"refresh_id_token",
"validate_api_key_format",
]