Event
You can register callback functions that are called when events such as initialization completion, login, or logout occur.
The available event types are as follows:
-
init
: Triggered when initialization is complete. -
login
: Triggered once when login is complete. -
logout
: Triggered once when logout is complete. -
user:set
: Triggered every time a user is assigned tofuro.user
after token issuance.The difference from the
login
event is thatlogin
occurs only when the initial login is complete, whileuser:set
occurs when a user is retrieved with an existing token. This typically happens during a page refresh.
API
furo.on(eventType, callback)
Registers a callback function to receive events.
The type of event you want to receive. init
, login
, logout
, user:set
The callback function that is called when the event occurs.
Was this page helpful?