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