11.0.0 • Published 3 years ago

fl-auth-redux v11.0.0

Weekly downloads
15
License
MIT
Repository
github
Last release
3 years ago

Redux actions and reducer for fl-auth-*, an auth package for FounderLab apps

Works alongside fl-auth-server and fl-auth-react.

Actions

  • login(url, email, password, callback)

    • Send a login request with the given email(username) and password to url.
  • register(url, userData, callback)

    • Send a register request with the given data to url.
    • userData should contain the fields {email, password} at minimum
  • resetRequest(url, email, callback)

    • Send a password reset email to the user who registered the email email
  • reset(url, email, password, resetToken, callback)

    • Perform the password reset for a user that has requested a reset via resetRequest
    • resetToken will be present as a query param in a link from email they receive. Make sure it's picked up and passed along
  • confirmEmail(url, email, token, callback)

    • Used when the user receives their email confirmation email. Pass the token back to the server.
  • logout()

    • Clear the user's session and log them out.
  • updateUser(user, callback)

    • Make changes to the user model directly.

accessTokenMiddleware

Appends an access token to each request as a query string or header.

Usage:

// add to your reducers    
import { reducer as auth } from 'fl-auth-redux'

reducers = {
  auth,
  ...
}

...


// use the login, register actions from your components
import { actions } from 'fl-auth-redux'

actions.login(url, email, password)
actions.register(url, userData, password)
actions.reset(url, email)
11.0.0

3 years ago

10.0.0

3 years ago

8.0.17

3 years ago

9.0.0-rc.6

3 years ago

9.0.0-rc.4

3 years ago

9.0.0-rc.2

3 years ago

9.0.0

3 years ago

7.3.1

6 years ago

7.2.7

6 years ago

7.0.14

6 years ago

7.0.8

6 years ago

7.0.6

6 years ago

7.0.0

6 years ago

6.19.0

6 years ago

6.7.6

7 years ago

6.0.2

8 years ago

6.0.1

8 years ago

6.0.0

8 years ago

5.0.3

8 years ago

1.0.0

8 years ago

1.0.0-alpha.7

8 years ago

1.0.0-alpha.6

8 years ago

1.0.0-alpha.5

8 years ago

1.0.0-alpha.4

8 years ago

1.0.0-alpha.3

8 years ago

1.0.0-alpha.2

8 years ago

1.0.0-alpha.1

8 years ago

0.11.5

9 years ago

0.11.4

9 years ago

0.11.3

9 years ago

0.11.2

10 years ago

0.11.1

10 years ago

0.11.0

10 years ago

0.10.1

10 years ago

0.10.0

10 years ago

0.4.2

10 years ago

0.4.1

10 years ago

0.6.2

10 years ago

0.6.1

10 years ago

0.4.0

10 years ago