Skip to main content
The Stytch SDK stores the of the logged-in in local storage. and will periodically refresh the cached data from the API. Use the organization.onChange method to listen for and react to changes to the Organization object.
Before using this method, enable in the Frontend SDK page.
If you need to asynchronously fetch guaranteed-fresh data from the API, use the organizations.get method.

Parameters

function
The callback function to call when the Organization changes. The first parameter is the updated Organization object.

Return value

function
The function to call to unsubscribe from the Organization change event.