11.0.0 • Published 1 year ago

fl-auth-redux v11.0.0

Weekly downloads
15
License
MIT
Repository
github
Last release
1 year 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

1 year ago

10.0.0

1 year ago

8.0.17

2 years ago

9.0.0-rc.6

2 years ago

9.0.0-rc.4

2 years ago

9.0.0-rc.2

2 years ago

9.0.0

2 years ago

7.3.1

4 years ago

7.2.7

4 years ago

7.0.14

5 years ago

7.0.8

5 years ago

7.0.6

5 years ago

7.0.0

5 years ago

6.19.0

5 years ago

6.7.6

6 years ago

6.0.2

6 years ago

6.0.1

6 years ago

6.0.0

6 years ago

5.0.3

6 years ago

1.0.0

7 years ago

1.0.0-alpha.7

7 years ago

1.0.0-alpha.6

7 years ago

1.0.0-alpha.5

7 years ago

1.0.0-alpha.4

7 years ago

1.0.0-alpha.3

7 years ago

1.0.0-alpha.2

7 years ago

1.0.0-alpha.1

7 years ago

0.11.5

8 years ago

0.11.4

8 years ago

0.11.3

8 years ago

0.11.2

8 years ago

0.11.1

8 years ago

0.11.0

8 years ago

0.10.1

8 years ago

0.10.0

8 years ago

0.4.2

8 years ago

0.4.1

8 years ago

0.6.2

8 years ago

0.6.1

8 years ago

0.4.0

8 years ago