Anatomy

The structure of a Lore application

/config/auth.js

This is the configuration file for lore-hook-auth and is where you define overrides for the default authentication behaviors.

New projects include a currentUser model, and the lore-hook-auth hook will generate an action called currentUser that will fetch the user, and a reducer called currentUser that will store the result of that action.

This file let's you control the name of the model, action and reducer used for fetching and storing the current user.

You can learn more about the configuration options here.

Default Config

The default config is shown below.

/**
 * Configuration file for authentication
 *
 * This file is where you define overrides for the default authentication behaviors.
 */

export default {

  /**
   * The name of the model with a URL property set to the endpoint
   * that can return the current user.
   */

  modelName: 'currentUser'

  /**
   * The name of the reducer that should be created that is responsible
   * for storing the current user. This defaults to the name of the
   * model.
   */

  reducerName: 'currentUser'

  /**
   * The name of the action that should be created at this responsible
   * for fetching the current user. This defaults to the name of the
   * model.
   */

  actionName: 'currentUser'

}