1.1.4 • Published 3 years ago

sawotest v1.1.4

Weekly downloads
12
License
MIT
Repository
-
Last release
3 years ago

Sawo

Passwordless and OTP-less Authentication for your website. Check the documentaion here.

Installing

A step by step series of examples that tell you how to get a development env running. These instructions will let you render the form in your speicified container, and allow you to attach successful login callback for futher actions.

Install the sawo package

npm i sawo

Import the Sawo class and verifyToken method from the sawo package

import {Sawo, verifyToken} from "sawo"

API Key

  • Login to sawo dev console.
  • Create a new project
    • Set Project Name
    • Set Project Host
      • For dev: point to localhost
      • For prod: point to your domain.
  • Copy the API key

Configuration

    var config = {
        // should be same as the id of the container
        containerID: "sawo-container",
        // can be one of 'email' or 'phone_number_sms'
        identifierType: "phone_number_sms",
        // Add the API key, generated in last step
        apiKey: "",
        // successful Login callback
        onSuccess: (payload) => {},
    };

Create Sawo instance

let sawo = new Sawo(<configuration>)

Call the showForm method

sawo.showForm()

After successful setup of Sawo sdk, a login form will rendered in the provided container. For ex: Login Form

Versioning

We use SemVer for versioning. For the versions available, see the tags on this repository.

Authors

  • Chander Prakash - Initial work - GitHub

License

This project is licensed under the MIT License