1.0.4 • Published 4 years ago

@appstitch/auth v1.0.4

Weekly downloads
-
License
MIT
Repository
-
Last release
4 years ago

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
        }
    })
}

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago