cape-redux-auth

A redux reducer for some authentication state.

Usage no npm install needed!

<script type="module">
  import capeReduxAuth from 'https://cdn.skypack.dev/cape-redux-auth';
</script>

README

cape-redux-auth v2.1.0

An example redux reducer for handling some authentication state.

Actions

  • login(user) Saves user object to auth.
  • loginRedirect(user, location) thunk action allow logging in and redirect using redux-history-sync.

Selectors

  • selectUser() Returns auth.user or graph.entity[selectUse().uid] if user in state is an object with a single id prop.