@refinio/one.models
    Preparing search index...

    Base model class for future authentication workflows/scenarios. This class contains the authentication state authState and the key-value store store, exposes events to external sources, and implements some common functionality you might find in any workflow/scenario.

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    Methods

    Constructors

    Properties

    onLogin: OEvent<(instanceName: string, secret: string, email: string) => void> = ...

    This event will be triggered right AFTER the instance was initialised

    onLogout: OEvent<() => void> = ...

    This event will be triggered right BEFORE the instance was closed

    Methods

    • Logouts the user. This function will:

      • trigger the 'logout' event
      • trigger onLogout and wait for all the listeners to finish
      • close the instance
      • trigger the 'logout_done' event if it is successfully

      Returns Promise<void>