Skip to main content

Manage ZefHub Authentication

Logging in for the first time

After starting a python session, you can run:

from zef import *
from zef.ops import *

login | run

This will open a browser to select how you would prefer to authenticate to ZefHub. There are several methods:

  • "Email": this is to use a given email address and password.
  • "GitHub": use O-Auth to create a ZefHub account that is linked with your GitHub account.
  • "Guest": don't create any account, but login as a guest user for this session only.

Login information for Zef is stored in ~/.zef/credentials for future sessions. No passwords are stored in this, only a refresh token.

Logging out

After starting a python session, you can run:

from zef import *
from zef.ops import *

logout | run

This is nearly equivalent to deleting the ~/.zef/credentials file.

danger

When graphs are unloaded, any ZefRef referencing that graph is invalidated. Accessing an invalid ZefRef will cause a segmentation fault.

Overriding the user account for a session

User accounts can be overridden with an environment variable or a plain text file. See the page configuration for more details.