Skip to content

satish-solera/sol-auth

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sol-auth


A package for the signUp and logIn with less code. Just import and use it in your project.

Install


     npm i sol-auth 

Uses


Import the package

     const auth = require("sol-auth");

SignUp Option

auth.signUp({
     username: username, 
     password: pass, 
     salt: salt 
});

LogIn Option

auth.logIn({
    username: username, 
    password: password, 
    hashPassword: hashPassword 
});

LogIn with JWT Token

auth.logIn({
    username: username, 
    password: password , 
    hashPassword: hashPassword ,  
    payload , secret, expiresIn
});

Examples

const signUpFunction = async () => {
    const signinData = await auth.signUp({
             username: username, 
             password: pass, 
             salt: salt 
    });     
}

    
const logInFunction = async () =>{
    const loginData = await auth.logIn({
            username: username,
             password: pass , 
             hashPassword: hashPassword 
    });
}

    

About

Sol-auth is the authentication package which is used for the auth in express backend with the type safety.

Resources

License

Contributing

Stars

Watchers

Forks

Packages

 
 
 

Contributors