@appstitch/auth

1.0.4 • Public • Published

Appstitch Auth

A straightforward library to handle user management. User credentials are protected using AES128 encryption

Install

npm install @appstitch/auth

Install Peer Dependancy AppStitch Core

npm install @appstitch/core

Usage

Initialize Appstitch in your root file

import appstitch from "@appstitch/core";

appstitch.initialize({ appStitchKey:your_stitch_key"});

Create a user

import auth from "@appstitch/auth";


const signUp = (email) => {

    const options = {
        email
    }
    auth.signUp(options).then(result => {

        if(result.success)
        {
            // Success
        }
    })
}

Sign In


import auth from "@appstitch/auth";


const signIn = (email) => {

    const options = {
        email
    }
    auth.signIn(options).then(result => {

        if(result.success)
        {
            // Success
        }
    })
}

Confirm User


import auth from "@appstitch/auth";

const confirmUser = (code) => {

    const options = {
        code
    }
    auth.confirmUser(options).then(result => {

        if(result.success)
        {
            // Success
        }
    })
}

Readme

Keywords

Package Sidebar

Install

npm i @appstitch/auth

Weekly Downloads

0

Version

1.0.4

License

MIT

Unpacked Size

4.45 kB

Total Files

6

Last publish

Collaborators

  • yashmaistry