Skip to content

Auth / Login

qcs.auth

login()

Start login flow with Auth0. If user is already logged out, this will open a browser window and ask you to login. It will print to console the status of the login process.

In Windows, tokens are stored in: %LOCALAPPDATA%\Quarisma\.qcs-tokens

In Linux/macOS, tokens are stored in: ~/.qcs-tokens

Raises: AuthenticationError: If authentication fails or times out PortInUseError: If port 3000 is already in use

Examples:

>>> qcs.auth.login()

logout()

Log out from Auth0 and clear stored tokens. It will print to console the status of the login process.

Raises: PortInUseError: If port 3000 is already in use

Examples:

>>> qcs.auth.logout()

user_info()

Get current user information from stored tokens.

Returns:

Type Description
Dict[str, bool | str]

A dictionary containing:

  • is_authenticated: boolean
  • email: string (empty if not available)

Examples:

>>> qcs.auth.user_info()
{
    'is_authenticated': True,
    'email': 'user@example.com',
}