Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

fl-auth-redux

Package Overview
Dependencies
Maintainers
1
Versions
40
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fl-auth-redux

Redux actions and reducer for fl-auth-*

  • 11.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
29
decreased by-6.45%
Maintainers
1
Weekly downloads
 
Created
Source

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)

FAQs

Package last updated on 11 May 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc