New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@8base/web-auth0-auth-client

Package Overview
Dependencies
Maintainers
2
Versions
150
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@8base/web-auth0-auth-client - npm Package Compare versions

Comparing version 0.10.2 to 0.10.3

30

dist/WebAuth0AuthClient.js

@@ -219,7 +219,3 @@ "use strict";

_this.auth0.logout({
returnTo: _this.logoutRedirectUri
});
case 2:
case 1:
case "end":

@@ -257,2 +253,26 @@ return _context5.stop();

})));
(0, _defineProperty2.default)(this, "logout",
/*#__PURE__*/
(0, _asyncToGenerator2.default)(
/*#__PURE__*/
_regenerator.default.mark(function _callee7() {
var options,
_args7 = arguments;
return _regenerator.default.wrap(function _callee7$(_context7) {
while (1) {
switch (_context7.prev = _context7.next) {
case 0:
options = _args7.length > 0 && _args7[0] !== undefined ? _args7[0] : {};
_this.auth0.logout((0, _objectSpread2.default)({
returnTo: _this.logoutRedirectUri
}, options));
case 2:
case "end":
return _context7.stop();
}
}
}, _callee7, this);
})));
this.workspaceId = workspaceId;

@@ -259,0 +279,0 @@ this.logoutRedirectUri = logoutRedirectUri;

4

package.json
{
"name": "@8base/web-auth0-auth-client",
"version": "0.10.2",
"version": "0.10.3",
"author": "8base",

@@ -16,3 +16,3 @@ "repository": "https://github.com/8base/sdk",

"dependencies": {
"@8base/utils": "^0.10.2",
"@8base/utils": "^0.10.3",
"@babel/runtime": "^7.3.1",

@@ -19,0 +19,0 @@ "auth0-js": "^9.9.1",

@@ -39,2 +39,33 @@ # 8base web auth0 auth client

const renderAuth = (auth) => {
const authorize = async () => {
const authData = await auth.authorize();
await auth.setAuthState({
token: authData.idToken,
email: authData.email,
});
};
const logout = async () => {
await auth.purgeAuthState();
await auth.logout();
};
if (auth.isAuthorized) {
return (
<div>
<p>Hi ${auth.authState.email} !</p>
<button type='button' onClick={ logout }>Logout</button>
</div>
);
}
return (
<div>
<button type='button' onClick={ authorize }>Authorize with auth0<button/>
</div>
);
};
...

@@ -45,5 +76,3 @@

<AuthContext.Consumer>
{
(auth: AuthContextProps) => (<div />)
}
{ renderAuth }
</AuthContext.Consumer>

@@ -50,0 +79,0 @@ ...

Sorry, the diff of this file is not supported yet

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