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

@startupjs/auth-local

Package Overview
Dependencies
Maintainers
7
Versions
119
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@startupjs/auth-local

Local auth plugin for StartupJS auth module

  • 0.30.1
  • npm
  • Socket score

Version published
Weekly downloads
143
increased by276.32%
Maintainers
7
Weekly downloads
 
Created
Source

import { LoginForm, RecoverForm, RegisterForm } from '@startupjs/auth-local'

Локальная авторизация

Инициализация главного модуля

Настройка главного модуля

Установка зависимостей

yarn add @startupjs/auth-local

Force compile

В webpack.server.config.cjs -> forceCompileModules добавить: @startupjs/auth-local/server

В webpack.web.config.cjs -> forceCompileModules добавить: @startupjs/auth-local

Инициализация на сервере

Импорт стратегии:

import { Strategy as LocalStrategy } from '@startupjs/auth-local/server'
initAuth(ee, {
  strategies: [
    new LocalStrategy({
      onCreatePasswordResetSecret: (userId, secret) => {
        // callback
      },
      onPasswordReset: userId => {
        // callback
      },
      onPasswordChange: userId => {
        // callback
      },
      onCreateEmailChangeSecret: (userId, secret) => {
        // callback
      },
      onEmailChange: userId => {
        // callback
      }
    })
  ]
})

Компоненты

LoginForm

Форма для авторизации

import { LoginForm } from '@startupjs/auth-local'
return <LoginForm />

RecoverForm

Форма для смены пароля

import { RecoverForm } from '@startupjs/auth-local'
return <RecoverForm />

RegisterForm

Форма для регистрации

import { RegisterForm } from '@startupjs/auth-local'
return <RegisterForm />

FAQs

Package last updated on 17 Dec 2020

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