fal.auth package

Submodules

fal.auth.auth0 module

fal.auth.auth0.build_jwk_client()
fal.auth.auth0.get_user_info(bearer_token)
Return type:

dict

fal.auth.auth0.login(console)

Runs the device authorization flow and stores the user object in memory

Return type:

dict

fal.auth.auth0.logout_url(return_url)
fal.auth.auth0.refresh(token)
Return type:

dict

fal.auth.auth0.revoke(token, console)
fal.auth.auth0.validate_id_token(token)

id_token is intended for the client (this sdk) only. Never send one to another service.

fal.auth.auth0.verify_access_token_expiration(token)

fal.auth.local module

fal.auth.local.delete_token()
Return type:

None

fal.auth.local.load_token()
Return type:

tuple[str | None, str | None]

fal.auth.local.lock_token()

Lock the access to the token file to avoid race conditions when running multiple scripts at the same time.

fal.auth.local.save_token(refresh_token, access_token=None)
Return type:

None

Module contents

class fal.auth.GoogleColabState

Bases: object

class fal.auth.UserAccess(_access_token=None, _user_info=None, _exc=None, _accounts=None)

Bases: object

property access_token: str
property accounts: list[dict]
property bearer_token: str
get_account(team)
Return type:

dict

property info: dict
fal.auth.current_user_info(headers)
Return type:

dict

fal.auth.get_colab_token()
Return type:

Optional[str]

fal.auth.is_google_colab()
Return type:

bool

fal.auth.key_credentials()
Return type:

tuple[str, str] | None

fal.auth.login(console)
fal.auth.logout(console)