Reference
API reference
The full API documentation of each package, and the members you use most.
The complete, versioned API documentation is generated from the source on pub.dev:
| Package | API documentation |
|---|---|
authyra | pub.dev/documentation/authyra |
authyra_flutter | pub.dev/documentation/authyra_flutter |
authyra_dio | pub.dev/documentation/authyra_dio |
authyra_google | pub.dev/documentation/authyra_google |
authyra_apple | pub.dev/documentation/authyra_apple |
Authyra at a glance
| Member | Purpose |
|---|---|
Authyra.initialize(storage:, providers:, policy:, config:) | Creates, starts and registers the app-wide instance. |
Authyra.instance | The instance registered by initialize. |
Authyra(...) + start() | An instance you inject yourself. |
state, states | The current AuthState, and a stream of it. |
events | A stream of AuthEvent. |
currentSession, sessions | The active session, and all of them. |
signIn(providerId, params:, activate:) | Signs in and stores the session. |
switchTo(key) | Makes another stored session active. |
signOut(key:), signOutAll() | Ends one or every session. |
accessToken(key:, rejectedToken:) | A valid access token, refreshed first if needed. |
refresh(key:) | Refreshes now. |
refreshIfNeeded() | Refreshes the active session if due. Called by AuthyraScope on resume. |
dispose() | Stops background work and waits for pending writes. |