@pga/auth-flow-provider
Advanced tools
Comparing version 1.8.0 to 1.9.0
@@ -6,4 +6,4 @@ # Change Log | ||
<a name="1.8.0"></a> | ||
# [1.8.0](https://github.com/pgahq/pga-common/compare/@pga/auth-flow-provider@0.0.5...@pga/auth-flow-provider@1.8.0) (2024-03-26) | ||
<a name="1.9.0"></a> | ||
# [1.9.0](https://github.com/pgahq/pga-common/compare/@pga/auth-flow-provider@0.0.5...@pga/auth-flow-provider@1.9.0) (2024-04-04) | ||
@@ -20,2 +20,3 @@ | ||
* **auth-flow-provider:** add cookieDomain to fix subdomain SSO ([6c46cf0](https://github.com/pgahq/pga-common/commit/6c46cf0)) | ||
* **auth-flow-provider:** add new methods for impersonation feature ([ea740d6](https://github.com/pgahq/pga-common/commit/ea740d6)) | ||
* **auth-flow-provider:** added RedirectToSignup and redirectToSignup to auth0 implementation ([d336225](https://github.com/pgahq/pga-common/commit/d336225)) | ||
@@ -22,0 +23,0 @@ * **auth-flow-provider:** enable useRefreshTokensFallback in Auth0 Client ([f33eea6](https://github.com/pgahq/pga-common/commit/f33eea6)) |
(function (global, factory) { | ||
if (typeof define === "function" && define.amd) { | ||
define(['exports', 'babel-runtime/regenerator', 'babel-runtime/helpers/asyncToGenerator', 'react', './client'], factory); | ||
define(['exports', 'babel-runtime/regenerator', 'babel-runtime/helpers/asyncToGenerator', 'react', './client', '../impersonation'], factory); | ||
} else if (typeof exports !== "undefined") { | ||
factory(exports, require('babel-runtime/regenerator'), require('babel-runtime/helpers/asyncToGenerator'), require('react'), require('./client')); | ||
factory(exports, require('babel-runtime/regenerator'), require('babel-runtime/helpers/asyncToGenerator'), require('react'), require('./client'), require('../impersonation')); | ||
} else { | ||
@@ -10,6 +10,6 @@ var mod = { | ||
}; | ||
factory(mod.exports, global.regenerator, global.asyncToGenerator, global.react, global.client); | ||
factory(mod.exports, global.regenerator, global.asyncToGenerator, global.react, global.client, global.impersonation); | ||
global.RedirectToLogout = mod.exports; | ||
} | ||
})(this, function (exports, _regenerator, _asyncToGenerator2, _react, _client) { | ||
})(this, function (exports, _regenerator, _asyncToGenerator2, _react, _client, _impersonation) { | ||
'use strict'; | ||
@@ -43,3 +43,4 @@ | ||
case 0: | ||
_context.next = 2; | ||
(0, _impersonation.clearAssumedUser)(false); | ||
_context.next = 3; | ||
return _client2.default.logout({ | ||
@@ -52,3 +53,3 @@ clientId: REACT_APP_AUTH0_CLIENT_ID, | ||
case 2: | ||
case 3: | ||
case 'end': | ||
@@ -55,0 +56,0 @@ return _context.stop(); |
(function (global, factory) { | ||
if (typeof define === "function" && define.amd) { | ||
define(['exports', './onelogin', './auth0'], factory); | ||
define(['exports', './onelogin', './auth0', './impersonation'], factory); | ||
} else if (typeof exports !== "undefined") { | ||
factory(exports, require('./onelogin'), require('./auth0')); | ||
factory(exports, require('./onelogin'), require('./auth0'), require('./impersonation')); | ||
} else { | ||
@@ -10,6 +10,6 @@ var mod = { | ||
}; | ||
factory(mod.exports, global.onelogin, global.auth0); | ||
factory(mod.exports, global.onelogin, global.auth0, global.impersonation); | ||
global.index = mod.exports; | ||
} | ||
})(this, function (exports, _onelogin, _auth) { | ||
})(this, function (exports, _onelogin, _auth, _impersonation) { | ||
'use strict'; | ||
@@ -20,3 +20,3 @@ | ||
}); | ||
exports.auth0 = exports.onelogin = undefined; | ||
exports.impersonation = exports.auth0 = exports.onelogin = undefined; | ||
@@ -27,2 +27,4 @@ var onelogin = _interopRequireWildcard(_onelogin); | ||
var impersonation = _interopRequireWildcard(_impersonation); | ||
function _interopRequireWildcard(obj) { | ||
@@ -47,2 +49,3 @@ if (obj && obj.__esModule) { | ||
exports.auth0 = auth0; | ||
exports.impersonation = impersonation; | ||
}); |
(function (global, factory) { | ||
if (typeof define === "function" && define.amd) { | ||
define(['exports', 'babel-runtime/helpers/classCallCheck', 'babel-runtime/helpers/createClass', 'babel-runtime/helpers/possibleConstructorReturn', 'babel-runtime/helpers/inherits', 'react'], factory); | ||
define(['exports', 'babel-runtime/helpers/classCallCheck', 'babel-runtime/helpers/createClass', 'babel-runtime/helpers/possibleConstructorReturn', 'babel-runtime/helpers/inherits', 'react', '../impersonation'], factory); | ||
} else if (typeof exports !== "undefined") { | ||
factory(exports, require('babel-runtime/helpers/classCallCheck'), require('babel-runtime/helpers/createClass'), require('babel-runtime/helpers/possibleConstructorReturn'), require('babel-runtime/helpers/inherits'), require('react')); | ||
factory(exports, require('babel-runtime/helpers/classCallCheck'), require('babel-runtime/helpers/createClass'), require('babel-runtime/helpers/possibleConstructorReturn'), require('babel-runtime/helpers/inherits'), require('react'), require('../impersonation')); | ||
} else { | ||
@@ -10,6 +10,6 @@ var mod = { | ||
}; | ||
factory(mod.exports, global.classCallCheck, global.createClass, global.possibleConstructorReturn, global.inherits, global.react); | ||
factory(mod.exports, global.classCallCheck, global.createClass, global.possibleConstructorReturn, global.inherits, global.react, global.impersonation); | ||
global.RedirectToLogout = mod.exports; | ||
} | ||
})(this, function (exports, _classCallCheck2, _createClass2, _possibleConstructorReturn2, _inherits2, _react) { | ||
})(this, function (exports, _classCallCheck2, _createClass2, _possibleConstructorReturn2, _inherits2, _react, _impersonation) { | ||
'use strict'; | ||
@@ -39,2 +39,3 @@ | ||
var redirectToLogout = function redirectToLogout(returnTo) { | ||
(0, _impersonation.clearAssumedUser)(false); | ||
window.location.assign(process.env.REACT_APP_AUTH_FLOW_BASE_URI + '/logout' + (returnTo != null ? '?returnTo=' + returnTo : '')); | ||
@@ -41,0 +42,0 @@ }; |
{ | ||
"name": "@pga/auth-flow-provider", | ||
"version": "1.8.0", | ||
"version": "1.9.0", | ||
"description": "PGA React Auth Provider Package", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
import { useEffect } from 'react' | ||
import auth0 from './client' | ||
import { clearAssumedUser } from '../impersonation' | ||
@@ -9,2 +10,3 @@ const { | ||
const redirectToLogout = async (returnTo) => { | ||
clearAssumedUser(false) | ||
await auth0.logout({ | ||
@@ -11,0 +13,0 @@ clientId: REACT_APP_AUTH0_CLIENT_ID, |
import * as onelogin from './onelogin' | ||
import * as auth0 from './auth0' | ||
import * as impersonation from './impersonation' | ||
export { | ||
onelogin, | ||
auth0 | ||
auth0, | ||
impersonation | ||
} |
import React from 'react' | ||
import { clearAssumedUser } from '../impersonation' | ||
const redirectToLogout = (returnTo) => { | ||
clearAssumedUser(false) | ||
window.location.assign(`${process.env.REACT_APP_AUTH_FLOW_BASE_URI}/logout${returnTo != null ? `?returnTo=${returnTo}` : ''}`) | ||
@@ -5,0 +7,0 @@ } |
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
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
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
96013
48
2183
25