0.13.0 • Published 7 years ago

lore-hook-auth v0.13.0

Weekly downloads
-
License
MIT
Repository
-
Last release
7 years ago

lore-hook-auth

Purpose

Generates an action and reducer for handling retrieval and storage of the current user.

Config

module.exports = {

  /**
   * 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'

};

When using this hook you should also modify the dependencies array of the redux hook in index.jsto make sure it runs after this hook:

// index.js
lore.summon({
  hooks: {
    auth: require('lore-hook-auth'),
    actions: require('lore-hook-actions'),
    bindActions: require('lore-hook-bind-actions'),
    connect: require('lore-hook-connect'),
    models: require('lore-hook-models'),
    reducers: require('lore-hook-reducers'),
    redux: _.extend(require('lore-hook-redux'), {
      dependencies: ['reducers', 'auth']
    })
  }
});
0.13.0

7 years ago

0.13.0-rc.2

7 years ago

0.13.0-rc.1

7 years ago

0.13.0-beta.16

7 years ago

0.13.0-beta.15

7 years ago

0.13.0-beta.14

7 years ago

0.13.0-beta.13

7 years ago

0.13.0-beta.12

7 years ago

0.13.0-beta.11

8 years ago

0.13.0-beta.10

8 years ago

0.13.0-beta.9

8 years ago

0.13.0-beta.7

8 years ago

0.13.0-beta.6

8 years ago

0.13.0-beta.5

8 years ago

0.13.0-beta.4

8 years ago

0.13.0-beta.3

8 years ago

0.13.0-beta.2

8 years ago

0.13.0-beta.1

8 years ago

0.12.7-rc.1

8 years ago

0.12.6

8 years ago

0.12.3

8 years ago

0.12.0

8 years ago

0.12.0-rc.1

8 years ago

0.11.5

8 years ago

0.12.0-beta.1

8 years ago

0.11.2

8 years ago

0.11.0

8 years ago

0.11.0-rc.1

8 years ago

0.11.0-beta.4

8 years ago

0.11.0-beta.1

9 years ago

0.10.0

9 years ago

0.10.0-beta.7

9 years ago