npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

vishwajeet-auth-lib

v1.0.0-SNAPSHOT-54

Published

this is auth kit for generating token

Downloads

30

Readme

Leap Auth Kit

this is auth kit for generating token

Installation

yarn add @leapfinance/auth-kit

Getting Started

First, Keep this component in global level or where you want to access it

import { WithLogin } from "@leapfinance/auth-kit";//import
<WithLogin appName={application_name} apiPath={server_path} logo={componey_logo} /> // component

How to use

leapLogin

To initiate Login Form

// init login modal
leapLogin(loginOption) 
loginOption

| Name | Type | Description | Default | |----------------------|---------------------------------------------------------|-------------------------------------------------------------|---------| | title | string | that need to show on login modal | null | | canClose | boolean | can login modal close | true | | phone | string | prefilled phone number | null | | callback | (token, options?: {phone, subscribedToWhatsapp}) =>void | when token generates successfully return token and options. | null | | canChangeCountryCode | boolean | enable multiple country selector | false | | logo | string | in case you want new logo on modal | null | | enableTrueCaller | boolean | enable truecaller login | true |

error

To show error message in modal

leapLogin.error("error message") 

loader

To Show Loader in Login Form

leapLogin.error("error message") 

login status

To check is Logged in

leapLogin.isLogin() // return boolean 

logout

To logout or delete cookies

leapLogin.logout() 

subscribe events

To subscribe events

leapLogin.subscribe(events,cb);
// where cb = (option?: LoginOptionDto) => void 

subscribe events list

| Event Name | Description | |----------------------|-----------------------------------| | INIT_LOGIN | when Login form initiate | | GENERATE_OTP | when generate otp action initiate | | GENERATE_OTP_SUCCESS | when generate otp successfully | | RESEND_OTP | when resend otp action initiate | | RESEND_OTP_SUCCESS | when resent otp successfully | | LOGIN_WITH_TC | when login with truecaller | | SUBMIT_OTP_SUCCESS | when otp verify successfully | | LOGIN_SUCCESS | when login successfully |