Skip to content

API reference

Contributors

The complete public surface. For worked examples see the guides.

  • TophhieAuth is the interactive stack: sign-in, silent tokens, sign-out, profile and sign-in history.
  • TophhieNativeAuth is the native stack: password reset, sign-in, sign-up, MFA and strong auth registration.
  • Types covers the result, profile and step types both stacks return.
  • Errors covers all three error enums.
  • Architecture covers how the two stacks are built and why.

Both TophhieAuth and TophhieNativeAuth are thread-safe singletons, with internal state guarded by a lock.

Methods that present UI, meaning signIn, acquireToken and signOut, are annotated @MainActor and take a presenting UIViewController. Call them from the main actor.

Every public async method is safe to await from structured concurrency.