Skip to content
This repository was archived by the owner on Nov 13, 2024. It is now read-only.

FormioAuth Provider

Randall Knutson edited this page Jul 27, 2016 · 10 revisions
  • FormioAuthProvider - This allows you to register the authentication login pages and provide the authenticated and anonymous states.

.config(function(FormioAuthProvider) {

// Set the base url for formio.
FormioAuthProvider.setStates('auth.login', 'home');
FormioAuthProvider.setForceAuth(true);
FormioAuthProvider.register('userLogin', 'user', 'user/login');
FormioAuthProvider.register('customerLogin', 'customer', 'customer/login');
```
  • FormioAuth - You need to run the init() method in order to initialize all of the authentications.

.run(function(FormioAuth) {

// Initialize the Form.io authentication provider.
FormioAuth.init();
```
Clone this wiki locally