Socket
Book a DemoInstallSign in
Socket

@knovator/novu-connector

Package Overview
Dependencies
Maintainers
4
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@knovator/novu-connector

1.0.0
latest
Source
npmnpm
Version published
Weekly downloads
2
Maintainers
4
Weekly downloads
 
Created
Source

@knovator/novu-connector

`@knovator/novu-connector` is package built that register and login the user.
Explore the docs »

View Demo · Report Bug · Request Feature

Table of Contents

About The Project

@knovator/novu-connector is package built to add user to the admin organization and get user login token.

(back to top)

Built With

(back to top)

Getting Started

To use this package you have to first setup your account on novu or on self hosted novu, and should be having your setup/admin credentials ready.

Installation

  • Install NPM packages
    npm install @knovator/novu-connector
    # or
    yarn add @knovator/novu-connector
    

(back to top)

Usage

After successfully creating account and having username and password credentials we can start using it,

Configuration

  • In app.js/main.js, you have to first configure package to use different baseURL,
    const { setConfig } = require('@knovator/novu-connector');
    
    setConfig('http://localhost:3000', false);
    
  • setConfig function accepts two parameters,
    • baseUrl - baseUrl to call the API
    • log - boolean to toggle logging in console

Registering User

  • To new member to current member team, we can use addUser function
    const { addUser } = require('@knovator/novu-connector');
    await addUser(
      { email: "admin@gmail.com", password: "admin1234" },
      { email: "johndoe@gmail.com", password: "johndoe123", role: "member", firstName: "John", lastName: "Doe"  }
    );
    
  • first parameter indicates admin credentials
  • second parameter indicates new user credentials, in which role can be member or admin

Login User

  • To login the user, we can use login function
    const { login } = require('@knovator/novu-connector');
    
    await login("johndoe@gmail.com", "johndoe123");
    
  • Returns { token: '...' } in case of credentials are correct.

(back to top)

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

  • Fork the Project
  • Create your Feature Branch (git checkout -b feature/AmazingFeature)
  • Commit your Changes (git commit -m 'Add some AmazingFeature')
  • Push to the Branch (git push origin feature/AmazingFeature)
  • Open a Pull Request

(back to top)

License

Distributed under the MIT License. See LICENSE.txt for more information.

(back to top)

Contact

Knovator Technologies

Project Link: https://github.com/knovator/novu-connector

(back to top)

Keywords

nodejs

FAQs

Package last updated on 15 Jul 2022

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

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.