api/locality_auth library

Classes

AccessToken
A class representing the current access token. It extends ChangeNotifier to allow listening for changes in the token value.
AuthDataWatcher
A singleton class responsible for watching and refreshing the access token when it expires. This class periodically checks if the token has expired and attempts to fetch a new one if necessary.
LocalityAuth
LoggedInUserOrError
A class representing either a successfully logged-in user or an authentication error.

Enums

AuthError
An enum representing different types of authentication errors that can occur.

Typedefs

WithNewAccessToken = dynamic Function(String newToken, DateTime expiresAt)
A function type alias that represents a callback to handle the event when a new access token is received. The function takes the newToken and its expiresAt time.