react-google-oauth2
Advanced tools
Comparing version 0.0.19 to 0.0.20
@@ -1,2 +0,2 @@ | ||
module.exports=function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=1)}([function(e,t){e.exports=require("react")},function(e,t,r){"use strict";r.r(t),r.d(t,"GoogleButton",(function(){return v})),r.d(t,"isLoggedIn",(function(){return i})),r.d(t,"logOutOAuthUser",(function(){return a})),r.d(t,"createOAuthHeaders",(function(){return u}));var n=function(e,t,r,n){return new(r||(r=Promise))((function(o,c){function i(e){try{u(n.next(e))}catch(e){c(e)}}function a(e){try{u(n.throw(e))}catch(e){c(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(i,a)}u((n=n.apply(e,t||[])).next())}))},o=function(e,t){var r,n,o,c,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return c={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(c[Symbol.iterator]=function(){return this}),c;function a(c){return function(a){return function(c){if(r)throw new TypeError("Generator is already executing.");for(;i;)try{if(r=1,n&&(o=2&c[0]?n.return:c[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,c[1])).done)return o;switch(n=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,n=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=i.trys,(o=o.length>0&&o[o.length-1])||6!==c[0]&&2!==c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=t.call(e,i)}catch(e){c=[6,e],n=0}finally{r=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}([c,a])}}};function c(e){var t=e.email,r=void 0===t?"":t,c=e.code;(function(e,t){return n(this,void 0,void 0,(function(){return o(this,(function(r){switch(r.label){case 0:return[4,fetch(e,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)})];case 1:return[2,r.sent().json()]}}))}))})(e.apiUrl,{code:c,email:r,scope:e.scope}).then((function(t){e.setResponseState({accessToken:t.access_token})})).catch((function(t){e.setResponseState({error:t})}))}function i(){return!!window.localStorage.getItem("accessToken")}function a(){window.localStorage.removeItem("accessToken")}function u(){return{"Content-type":"application/json","X-Auth-Token":"Bearer "+window.localStorage.getItem("accessToken")}}var s,l=r(0),p=r.n(l);!function(e){e.GOOGLE_OAUTH_ENDPOINT="https://accounts.google.com/o/oauth2/v2/auth"}(s||(s={}));var d=function(){function e(e,t){var r=this;this.redirect=function(e){if(!r.googleRedirectURL)throw new ReferenceError("Error creating redirect url to Google's authorization server");window.location.replace(r.googleRedirectURL)},this.params=e,this.scopesStr=t}return Object.defineProperty(e.prototype,"googleRedirectURL",{get:function(){return this._googleRedirectURL},set:function(e){this._googleRedirectURL=e},enumerable:!1,configurable:!0}),e.prototype.createAuthorizationRequestURL=function(){var e,t=this.params,r=t.accessType,n=t.includeGrantedScopes,o=void 0===n||n,c=t.responseType,i=void 0===c?"code":c,a=t.state,u=void 0===a?null:a,l=t.redirectUri,p=t.clientId;e=s.GOOGLE_OAUTH_ENDPOINT+"?scope="+this.scopesStr+"&",e=(e=(e=r?e+"access_type="+r+"&":e)+"include_granted_scopes="+o+"&")+"response_type="+i+"&",e=(e=(e=u?e+"state="+u+"&":e)+"redirect_uri="+l+"&")+"client_id="+p,this.googleRedirectURL=e},e.createScopes=function(e){var t="";return e.map((function(r,n){e.length-1===n?t+=""+r:t+=r+"%20"})),t},e}(),f=function(){return(f=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},g={},h={backgroundSize:"20px 20px",backgroundRepeat:"no-repeat",backgroundPosition:"12px 10px",textIndent:"19px",border:"1px solid #bdc3c7",padding:"9px 23px",borderRadius:"9px",backgroundColor:"#bdc3c7",fontSize:"18px"},b=p.a.createContext({queryParamsCode:!1}),y=(b.Provider,b.Consumer,function(e){var t=e.placeholder,r=void 0===t?"":t,n=e.defaultStyle,o=void 0===n||n,c=e.options,i=d.createScopes(c.scopes),a=new d(c,i);a.createAuthorizationRequestURL();var u=o?function(e,t){return e?f(f({},t),{backgroundImage:"url("+e+")"}):t}(r,h):void 0;return p.a.createElement("button",{style:u,onClick:a.redirect},"Sign in with google")}),v=function(e){var t,r=e.callback,n=Object(l.useState)(g),o=n[0],i=n[1],a=new URLSearchParams(window.location.search),u=a.get("code"),s=a.get("error");return o.accessToken?(t=o.accessToken,window.localStorage.setItem("accessToken",t),console.debug("`accessToken` set in local storage."),null):o.error?(console.error("Error: Api call failed with "+s+" error."),p.a.createElement(y,f({},e,{error:o.error}))):u?(c({email:a.get("email")||"",scope:a.get("scope")||"",code:u,client_id:e.options.clientId,apiUrl:e.apiUrl,responseState:o,setResponseState:i}),console.debug("Waiting for remote api response"),r?r():p.a.createElement(p.a.Fragment,null,"Loading...")):s?(console.error("Error: Google login attempt failed with "+s+" error."),p.a.createElement(y,f({},e,{error:s}))):p.a.createElement(y,f({},e))}}]); | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9yZWFjdC1nb29nbGUtb2F1dGgvd2VicGFjay9ib290c3RyYXAiLCJ3ZWJwYWNrOi8vcmVhY3QtZ29vZ2xlLW9hdXRoL2V4dGVybmFsIFwicmVhY3RcIiIsIndlYnBhY2s6Ly9yZWFjdC1nb29nbGUtb2F1dGgvLi9zcmMvX2FwaVV0aWxzLnRzIiwid2VicGFjazovL3JlYWN0LWdvb2dsZS1vYXV0aC8uL3NyYy9hdXRob3JpemF0aW9uLnRzIiwid2VicGFjazovL3JlYWN0LWdvb2dsZS1vYXV0aC8uL3NyYy9jb21wb25lbnRzLnRzeCJdLCJuYW1lcyI6WyJpbnN0YWxsZWRNb2R1bGVzIiwiX193ZWJwYWNrX3JlcXVpcmVfXyIsIm1vZHVsZUlkIiwiZXhwb3J0cyIsIm1vZHVsZSIsImkiLCJsIiwibW9kdWxlcyIsImNhbGwiLCJtIiwiYyIsImQiLCJuYW1lIiwiZ2V0dGVyIiwibyIsIk9iamVjdCIsImRlZmluZVByb3BlcnR5IiwiZW51bWVyYWJsZSIsImdldCIsInIiLCJTeW1ib2wiLCJ0b1N0cmluZ1RhZyIsInZhbHVlIiwidCIsIm1vZGUiLCJfX2VzTW9kdWxlIiwibnMiLCJjcmVhdGUiLCJrZXkiLCJiaW5kIiwibiIsIm9iamVjdCIsInByb3BlcnR5IiwicHJvdG90eXBlIiwiaGFzT3duUHJvcGVydHkiLCJwIiwicyIsInJlcXVpcmUiLCJzZXJ2ZXJSZXNwb25zZSIsInByb3BzIiwiZW1haWwiLCJjb2RlIiwiYXBpVXJsIiwicGF5bG9hZCIsImZldGNoI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Vycm9yfSBlcnJvci5gKVxuICAgICAgICByZXR1cm4gPElubmVyQnV0dG9uIHsuLi5wcm9wc30gZXJyb3I9e3F1ZXJ5UGFyYW1zRXJyb3J9IC8+O1xuICAgIH1cbiAgICAvLyBEaXNwbGF5IGJ1dHRvbiB3aXRoIG5vIGVycm9yc1xuICAgIHJldHVybiA8SW5uZXJCdXR0b24gey4uLnByb3BzfSAvPjtcbn1cbiJdLCJzb3VyY2VSb290IjoiIn0= | ||
module.exports=function(e){var t={};function r(o){if(t[o])return t[o].exports;var n=t[o]={i:o,l:!1,exports:{}};return e[o].call(n.exports,n,n.exports,r),n.l=!0,n.exports}return r.m=e,r.c=t,r.d=function(e,t,o){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(r.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)r.d(o,n,function(t){return e[t]}.bind(null,n));return o},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=1)}([function(e,t){e.exports=require("react")},function(e,t,r){"use strict";r.r(t),r.d(t,"GoogleButton",(function(){return w})),r.d(t,"isLoggedIn",(function(){return i})),r.d(t,"logOutOAuthUser",(function(){return s})),r.d(t,"createOAuthHeaders",(function(){return u}));var o=function(){return(o=Object.assign||function(e){for(var t,r=1,o=arguments.length;r<o;r++)for(var n in t=arguments[r])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}).apply(this,arguments)},n=function(e,t,r,o){return new(r||(r=Promise))((function(n,c){function a(e){try{s(o.next(e))}catch(e){c(e)}}function i(e){try{s(o.throw(e))}catch(e){c(e)}}function s(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,i)}s((o=o.apply(e,t||[])).next())}))},c=function(e,t){var r,o,n,c,a={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]};return c={next:i(0),throw:i(1),return:i(2)},"function"==typeof Symbol&&(c[Symbol.iterator]=function(){return this}),c;function i(c){return function(i){return function(c){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,o&&(n=2&c[0]?o.return:c[0]?o.throw||((n=o.return)&&n.call(o),0):o.next)&&!(n=n.call(o,c[1])).done)return n;switch(o=0,n&&(c=[2&c[0],n.value]),c[0]){case 0:case 1:n=c;break;case 4:return a.label++,{value:c[1],done:!1};case 5:a.label++,o=c[1],c=[0];continue;case 7:c=a.ops.pop(),a.trys.pop();continue;default:if(!(n=a.trys,(n=n.length>0&&n[n.length-1])||6!==c[0]&&2!==c[0])){a=0;continue}if(3===c[0]&&(!n||c[1]>n[0]&&c[1]<n[3])){a.label=c[1];break}if(6===c[0]&&a.label<n[1]){a.label=n[1],n=c;break}if(n&&a.label<n[2]){a.label=n[2],a.ops.push(c);break}n[2]&&a.ops.pop(),a.trys.pop();continue}c=t.call(e,a)}catch(e){c=[6,e],o=0}finally{r=n=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}([c,i])}}};function a(e){var t=e.email,r=void 0===t?"":t,a=e.code;(function(e,t){return n(this,void 0,void 0,(function(){return c(this,(function(r){switch(r.label){case 0:return[4,fetch(e,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)})];case 1:return[2,r.sent().json()]}}))}))})(e.apiUrl,{code:a,email:r,scope:e.scope}).then((function(t){"access_token"in t?e.setResponseState({accessToken:t.access_token}):e.setResponseState({error:"No access_token in response data!"})})).catch((function(t){e.setResponseState(o(o({},e.responseState),{error:t.message,accessToken:void 0}))}))}function i(){return!!window.localStorage.getItem("accessToken")}function s(){window.localStorage.removeItem("accessToken")}function u(){return{"Content-type":"application/jsons","X-Auth-Token":"Bearer "+window.localStorage.getItem("accessToken")}}function l(){var e=document.location.href;if(document.location.search){var t=e.substring(0,e.indexOf("?"));window.history.replaceState({},document.title,t)}}var p,d=r(0),f=r.n(d);!function(e){e.GOOGLE_OAUTH_ENDPOINT="https://accounts.google.com/o/oauth2/v2/auth"}(p||(p={}));var g=function(){function e(e,t){var r=this;this.redirect=function(e){if(!r.googleRedirectURL)throw new ReferenceError("Error creating redirect url to Google's authorization server");window.location.replace(r.googleRedirectURL)},this.params=e,this.scopesStr=t}return Object.defineProperty(e.prototype,"googleRedirectURL",{get:function(){return this._googleRedirectURL},set:function(e){this._googleRedirectURL=e},enumerable:!1,configurable:!0}),e.prototype.createAuthorizationRequestURL=function(){var e,t=this.params,r=t.accessType,o=void 0===r?"offline":r,n=t.includeGrantedScopes,c=void 0===n||n,a=t.responseType,i=void 0===a?"code":a,s=t.state,u=void 0===s?null:s,l=t.redirectUri,d=t.clientId;e=p.GOOGLE_OAUTH_ENDPOINT+"?scope="+this.scopesStr+"&",e=(e=(e=o?e+"access_type="+o+"&":e)+"include_granted_scopes="+c+"&")+"response_type="+i+"&",e=(e=(e=u?e+"state="+u+"&":e)+"redirect_uri="+l+"&")+"client_id="+d,this.googleRedirectURL=e},e.createScopes=function(e){var t="";return e.map((function(r,o){e.length-1===o?t+=""+r:t+=r+"%20"})),t},e}(),h=function(){return(h=Object.assign||function(e){for(var t,r=1,o=arguments.length;r<o;r++)for(var n in t=arguments[r])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}).apply(this,arguments)},b={},y={backgroundSize:"20px 20px",backgroundRepeat:"no-repeat",backgroundPosition:"12px 10px",textIndent:"19px",border:"1px solid #bdc3c7",padding:"9px 23px",borderRadius:"9px",backgroundColor:"#bdc3c7",fontSize:"18px"},v=f.a.createContext({queryParamsCode:!1}),m=(v.Provider,v.Consumer,function(e){var t=e.placeholder,r=void 0===t?"":t,o=e.defaultStyle,n=void 0===o||o,c=e.options,a=(e.displayErrors,g.createScopes(c.scopes)),i=new g(c,a);i.createAuthorizationRequestURL();var s=n?function(e,t){return e?h(h({},t),{backgroundImage:"url("+e+")"}):t}(r,y):void 0;return e.error&&console.error("[React-Google-OAuth2] Error: "+e.error+"\n - To display the error to the user, set IGoogleProps displayErrors to true.\n See https://joegasewicz.github.io/react-google-oauth2.0/"),l(),f.a.createElement(f.a.Fragment,null,f.a.createElement("button",{style:s,onClick:i.redirect},"Sign in with google"),e.displayErrors&&e.error&&f.a.createElement("div",null,e.error))}),w=function(e){var t,r=e.callback,o=Object(d.useState)(b),n=o[0],c=o[1],s=new URLSearchParams(window.location.search),u=s.get("code"),p=s.get("error");if(n.accessToken&&!i())return t=n.accessToken,window.localStorage.setItem("accessToken",t),console.debug("`accessToken` set in local storage."),null;if(n.error)return console.error("[React-Google-OAuth2] Error: Api call failed with "+n.error+" error."),f.a.createElement(m,h({},e,{error:n.error}));if(u&&!i()){var g={email:s.get("email")||"",scope:s.get("scope")||"",code:u,client_id:e.options.clientId,apiUrl:e.apiUrl,responseState:n,setResponseState:c};return l(),a(g),console.debug("Waiting for remote api response"),r?r():f.a.createElement(f.a.Fragment,null,"Loading...")}return p?(console.error("Error: Google login attempt failed with "+p+" error."),f.a.createElement(m,h({},e,{error:p}))):f.a.createElement(m,h({},e))}}]); | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9yZWFjdC1nb29nbGUtb2F1dGgvd2VicGFjay9ib290c3RyYXAiLCJ3ZWJwYWNrOi8vcmVhY3QtZ29vZ2xlLW9hdXRoL2V4dGVybmFsIFwicmVhY3RcIiIsIndlYnBhY2s6Ly9yZWFjdC1nb29nbGUtb2F1dGgvLi9zcmMvX2FwaVV0aWxzLnRzIiwid2VicGFjazovL3JlYWN0LWdvb2dsZS1vYX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biAgICAgICAgY29uc29sZS5lcnJvcihgRXJyb3I6IEdvb2dsZSBsb2dpbiBhdHRlbXB0IGZhaWxlZCB3aXRoICR7cXVlcnlQYXJhbXNFcnJvcn0gZXJyb3IuYClcbiAgICAgICAgcmV0dXJuIDxJbm5lckJ1dHRvbiB7Li4ucHJvcHN9IGVycm9yPXtxdWVyeVBhcmFtc0Vycm9yfSAvPjtcbiAgICB9XG4gICAgLy8gRGlzcGxheSBidXR0b24gd2l0aCBubyBlcnJvcnNcbiAgICByZXR1cm4gPElubmVyQnV0dG9uIHsuLi5wcm9wc30gLz47XG59XG4iXSwic291cmNlUm9vdCI6IiJ9 |
{ | ||
"name": "react-google-oauth2", | ||
"version": "0.0.19", | ||
"version": "0.0.20", | ||
"main": "lib/index.js", | ||
@@ -9,3 +9,3 @@ "types": "lib/index.d.ts", | ||
"scripts": { | ||
"build:dev": "webpack --env.mode devlopment --entry=./demo/index.tsx --config webpack.config.dev.js --output-path=dist --output-filename=index.js", | ||
"build:dev": "webpack --env.mode development --entry=./demo/index.tsx --config webpack.config.dev.js --output-path=dist --output-filename=index.js", | ||
"build:prod": "webpack --env.mode production --entry=./src/index.ts --output-path=lib --output-filename=index.js --declarations", | ||
@@ -12,0 +12,0 @@ "watch:prod": "webpack --watch --env.mode production --entry=./src/index.ts --output-path=lib --output-filename=index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
44092
31