Skip to main content
The First Step
Jun 25, 2015 9:01 PM UTC
Question

How do I handle access or authentication exceptions while the application is running?

To handle possible access or authentication exceptions that may occur while the application is running (after the user has successfully logged in), you can provide a handler for the accessViolation platform event.

platform.on(platform.events.accessViolation, function(e){
    // do something
});

A recommended way to handle access or authentication exceptions is to direct the user to the login page or UI. The login page may attempt to automatically re-authenticate the user using stored authentication data (see below).