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

@equinor/fusion

Package Overview
Dependencies
Maintainers
2
Versions
485
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@equinor/fusion - npm Package Compare versions

Comparing version 0.1.57 to 0.1.58

1

lib/auth/AuthContainer.d.ts

@@ -60,2 +60,3 @@ import AuthApp from "./AuthApp";

getCachedUser(): AuthUser | null;
private updateTokenForAppAsync;
protected cacheUserAsync(user: AuthUser): Promise<void>;

@@ -62,0 +63,0 @@ protected static getResourceOrigin(resource: string): string;

19

lib/auth/AuthContainer.js

@@ -36,6 +36,3 @@ import AuthApp from "./AuthApp";

this.apps.push(app);
await this.cache.storeTokenAsync(app, parsedToken);
const cachedUser = (await this.getCachedUserAsync()) || AuthUser.createFromToken(parsedToken);
cachedUser.mergeWithToken(parsedToken);
await this.cacheUserAsync(cachedUser);
await this.updateTokenForAppAsync(app, token);
window.location.hash = "";

@@ -57,3 +54,8 @@ }

}
return await this.refreshTokenAsync(resource);
const refreshedToken = await this.refreshTokenAsync(resource);
if (!refreshedToken) {
return null;
}
await this.updateTokenForAppAsync(app, refreshedToken);
return refreshedToken;
}

@@ -111,2 +113,9 @@ async refreshTokenAsync(resource) {

}
async updateTokenForAppAsync(app, token) {
const parsedToken = AuthToken.parse(token);
await this.cache.storeTokenAsync(app, parsedToken);
const cachedUser = (await this.getCachedUserAsync()) || AuthUser.createFromToken(parsedToken);
cachedUser.mergeWithToken(parsedToken);
await this.cacheUserAsync(cachedUser);
}
async cacheUserAsync(user) {

@@ -113,0 +122,0 @@ this.cachedUser = user;

{
"name": "@equinor/fusion",
"version": "0.1.57",
"version": "0.1.58",
"description": "Everything a Fusion app needs to communicate with the core",

@@ -5,0 +5,0 @@ "main": "lib/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