UNPKG

@neo_auth/neo-sso

Version:
121 lines (80 loc) 5.25 kB
# Neo Auth SSO ## Manage and secure user authentication into cloud applications. [![N|Solid](https://tethysfaceid.herokuapp.com/neo_log_background.jpg)](https://tethyseid.com/) ## ✨ Features - 🌍 Able to identify an individual in real time using their facial biometrics. - 🌈 Redirect user to defined success URL. - 📦 library size is less than 10KB. ## 🖥 Environment Support - Modern browsers | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/edge/edge_48x48.png" alt="Edge" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)<br>Edge | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/firefox/firefox_48x48.png" alt="Firefox" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)<br>Firefox | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/chrome/chrome_48x48.png" alt="Chrome" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)<br>Chrome | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/safari/safari_48x48.png" alt="Safari" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)<br>Safari | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/electron/electron_48x48.png" alt="Electron" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)<br>Electron | | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | Edge | last 2 versions | last 2 versions | last 2 versions | last 2 versions | ## 📦 Install ```bash npm install @neo-auth/neo-sso ``` ```bash yarn add @neo-auth/neo-sso ``` ## 🌍 Images [![N|Solid](https://face-app-popup-dhrumil789.vercel.app/upload.jpg)]() ## 🔨 Usage ## Steps for usage three main steps we required to integrate this library - install neo-auth package in your project - import library where you want to use - call showModal method on specif events ex: login, signup ## 1. Installation neo-auth requires [Node.js](https://nodejs.org/) v10+ to run. Install the dependencies and devDependencies and start the server. ```sh cd <your-app> npm install @neo-auth/neo-sso ...restart your node server... ``` For production environments... follow the same procedure as above ## 2. Import showModal Method import showModal method from @neo-auth/neo-sso showModal is a function which we use to open face scan popup from library ```sh import { showModal } from "@neo-auth/neo-sso" ``` or ```sh const { showModal } = required("@neo-auth/neo-sso") ``` ## 3. Fire event to open a popup showModal method required one paramter - successUrl this url will help us for redirection incase of success or failure Usage: ```sh showModal({ successUrl:"<any-success-url>" }) ``` Example: Method ```jsx const onClickFaceIDButton = () => { showModal({ integrationID: 'placeholder_Integration_ID', successUrl: 'placeholder_Success_Url', }); }; ``` HTML call ```jsx <div> <Button type="primary" htmlType="submit"> Submit </Button> <Button type="primary" onClick={onClickFaceIDButton}> Face ID Sign in {/* Button Custom Text */} </Button> </div> ``` ## 🌍 Internationalization This package is supported internationally. ## License MIT