@leafwell/authentication
v0.0.9
Published
A simple document for Leafwell Provider authentication lib for any of these enviroments: Node.js and compatible with React and React Native. For better understading about the methods and arguments, please make ensure you have typescript installed and conf
Downloads
14
Readme
Leafwell Provider Authentication
A simple document for Leafwell Provider authentication lib for any of these enviroments: Node.js and compatible with React and React Native. For better understading about the methods and arguments, please make ensure you have typescript installed and configured on your project.
Installation
Using npm:
$ npm install @leafwell/authentication
Using yarn:
$ yarn add @leafwell/authentication
Example
import Authentication from "@leafwell/authentication";
(async function main() {
Authentication.initialize("API_URL");
/**
* The response will be the full object returned by Google, Facebook and Apple
* providers. You just need to pass them directly
* */
const data = await Authentication.signupUsingProviders(response);
console.log(data);
})();
Usage
Authenticate
You need to start by authentication. Use the initialize method to setup and prepare your api client:
Authentication.initialize(API_URL);
Methods/properties available
Authentication.signupUsingProviders(response);
Authentication.signup(response);
Authentication.login(response);
Authentication.notifyResetPassword(response);
Authentication.setPassword(response);