@samhammer/authentication-vue 2.1.0 → 2.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/AuthPlugin.js CHANGED
@@ -41,7 +41,7 @@ export class AuthPlugin {
41
41
  async loginGuest() {
42
42
  if (!this.authOptions)
43
43
  throw new Error("Init has to be called first");
44
- this.guest.login(this.authOptions);
44
+ await this.guest.login(this.authOptions);
45
45
  }
46
46
  async login(idp) {
47
47
  await this.keycloak.login(window.location.href, idp);
@@ -62,7 +62,7 @@ export class AuthPlugin {
62
62
  }
63
63
  async logout(redirectUri) {
64
64
  if (this.guest.authenticated) {
65
- this.guest.logout();
65
+ await this.guest.logout();
66
66
  return;
67
67
  }
68
68
  await this.keycloak.logout(redirectUri);
@@ -139,7 +139,7 @@ class KeycloakPlugin {
139
139
  }
140
140
  async onTokenExpired() {
141
141
  // force refresh
142
- this.refresh(-1);
142
+ await this.refresh(-1);
143
143
  }
144
144
  async login(redirectUri, idp) {
145
145
  console.debug("login navigating to keycloak with returnUrl", redirectUri);
@@ -234,7 +234,7 @@ class GuestPlugin {
234
234
  throw new Error("Init has to be called first");
235
235
  this.pluginState.guestId = uuidv4();
236
236
  await StoreProvider.store.setItem(this.pluginState.guestKey, this.pluginState.guestId);
237
- this.init(authOptions);
237
+ await this.init(authOptions);
238
238
  AuthEvents.emit(AuthEventNames.isGuestAuthenticated);
239
239
  }
240
240
  async logout() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@samhammer/authentication-vue",
3
- "version": "2.1.0",
3
+ "version": "2.2.0",
4
4
  "description": "Keycloak authentication for VueJS projects",
5
5
  "main": "lib/index.js",
6
6
  "typings": "lib/index.d.ts",
@@ -39,10 +39,14 @@
39
39
  "typescript": "^4.7.4"
40
40
  },
41
41
  "dependencies": {
42
- "axios": "^1.3.4",
42
+ "axios": "^1.6.7",
43
43
  "emittery": "^1.0.1",
44
44
  "keycloak-js": "^20.0.3",
45
45
  "lodash": "^4.17.21",
46
46
  "uuid": "^9.0.0"
47
+ },
48
+ "volta": {
49
+ "node": "18.19.0",
50
+ "yarn": "1.22.21"
47
51
  }
48
52
  }