Skip to main content

pdsx._internal.auth

authentication utilities for atproto.

Functions

login_with_session_fallback

log in, tolerating PDSes that do not proxy AppView methods. AsyncClient.login establishes the session and then populates client.me via app.bsky.actor.getProfile — an AppView method. A PDS that doesn’t proxy it (zds, for one) answers 404 UnknownMethod at that second step, after the session is already set, so a login that actually succeeded surfaces as a total failure. Only the profile lookup is optional, so fall back to the identity the session already carries. A non-existent session means createSession itself failed (bad credentials), which must still raise.

login

authenticate with atproto. Args:
  • client: atproto client to authenticate
  • handle: user handle
  • password: user password
  • silent: suppress authentication output
  • required: whether authentication is required
Returns:
  • True if authenticated, False if skipped (when not required)