1.0.0 • Published 3 years ago

npm-login-oauth v1.0.0

Weekly downloads
-
License
ISC
Repository
-
Last release
3 years ago

npm-login-oauth

A package for oauth login url creation

Install

npm install npm-login-oauth

Usage

const loginOauth = require("npm-login-oauth");
let oauthbaseURL = "Oauth Base URL"; // Replae oauth base url
let oauthClientId = "Oauth Client Id"; // Replae oauth client id
let redirectURI = "Redirection URL"; // Replace redirection url after login
let loginOauthURLObj = loginOauth.loginOauth.loginLink(oauthbaseURL, oauthClientId, redirectURI);
if(loginOauthURLObj.status=='200'){
    windows.location = loginOauthURLObj.url;
}else{
    console.log(loginOauthURLObj.message); //loginOauthURLObj.message contains error message.
}