Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@pga/auth-flow-provider

Package Overview
Dependencies
Maintainers
16
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@pga/auth-flow-provider - npm Package Compare versions

Comparing version 0.0.1-1 to 0.0.1-2

57

dist/AuthFlowProvider.js

@@ -43,2 +43,3 @@ (function (global, factory) {

var ANONYMOUS_ROLE = 'ANONYMOUS';
var SESSION_TIMEOUT_CHECK = 2 * 60 * 1000;

@@ -60,2 +61,5 @@ var AuthContext = _react2.default.createContext();

_this.state = { authReady: false, isLoggedIn: false, me: null };
_this.sessionTimedId = null;
_this.fetchSession = _this.fetchSession.bind(_this);
return _this;

@@ -65,3 +69,3 @@ }

(0, _createClass3.default)(AuthFlowProvider, [{
key: 'componentDidMount',
key: 'fetchSession',
value: function () {

@@ -139,9 +143,58 @@ var _ref = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee() {

function componentDidMount() {
function fetchSession() {
return _ref.apply(this, arguments);
}
return fetchSession;
}()
}, {
key: 'componentDidMount',
value: function () {
var _ref5 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee2() {
return _regenerator2.default.wrap(function _callee2$(_context2) {
while (1) {
switch (_context2.prev = _context2.next) {
case 0:
_context2.prev = 0;
_context2.next = 3;
return this.fetchSession();
case 3:
_context2.next = 8;
break;
case 5:
_context2.prev = 5;
_context2.t0 = _context2['catch'](0);
console.log(_context2.t0);
case 8:
this.sessionTimedId = setTimeout(this.fetchSession, SESSION_TIMEOUT_CHECK);
console.log('this.sessionTimedId: ', this.sessionTimedId);
case 10:
case 'end':
return _context2.stop();
}
}
}, _callee2, this, [[0, 5]]);
}));
function componentDidMount() {
return _ref5.apply(this, arguments);
}
return componentDidMount;
}()
}, {
key: 'componentWillUnmount',
value: function componentWillUnmount() {
if (this.sessionTimedId) {
clearTimeout(this.sessionTimedId);
}
}
}, {
key: 'render',

@@ -148,0 +201,0 @@ value: function render() {

2

package.json
{
"name": "@pga/auth-flow-provider",
"version": "0.0.1-1",
"version": "0.0.1-2",
"description": "PGA React Auth Provider Package for OneLogin's Authorization Flow",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc