@drax/identity-vue 0.7.23 → 0.8.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/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "0.7.23",
6
+ "version": "0.8.0",
7
7
  "type": "module",
8
8
  "main": "./src/index.ts",
9
9
  "module": "./src/index.ts",
@@ -24,12 +24,12 @@
24
24
  "format": "prettier --write src/"
25
25
  },
26
26
  "dependencies": {
27
- "@drax/common-front": "^0.7.4",
28
- "@drax/common-vue": "^0.7.4",
29
- "@drax/crud-front": "^0.7.21",
30
- "@drax/crud-share": "^0.7.21",
31
- "@drax/crud-vue": "^0.7.21",
32
- "@drax/identity-share": "^0.7.0"
27
+ "@drax/common-front": "^0.8.0",
28
+ "@drax/common-vue": "^0.8.0",
29
+ "@drax/crud-front": "^0.8.0",
30
+ "@drax/crud-share": "^0.8.0",
31
+ "@drax/crud-vue": "^0.8.0",
32
+ "@drax/identity-share": "^0.8.0"
33
33
  },
34
34
  "peerDependencies": {
35
35
  "pinia": "^2.2.2",
@@ -66,5 +66,5 @@
66
66
  "vue-tsc": "^2.1.6",
67
67
  "vuetify": "^3.7.1"
68
68
  },
69
- "gitHead": "f4576125e92d2087b7df7950b68b63f9a498d243"
69
+ "gitHead": "4c5c82ae5a92ea25c75f821b5aa1e64126b131cb"
70
70
  }
@@ -37,9 +37,13 @@ export function useAuth() {
37
37
  }
38
38
 
39
39
  function logout() {
40
+ clearAuth()
41
+ router.push({name: 'Login'})
42
+ }
43
+
44
+ function clearAuth(){
40
45
  authSystem.logout()
41
46
  authStore.clearAuth()
42
- router.push({name: 'Login'})
43
47
  }
44
48
 
45
49
  function hasPermission(permission: string) {
@@ -50,13 +54,11 @@ export function useAuth() {
50
54
  return authStore.accessToken ? AuthHelper.isJWTValid(authStore.accessToken) : false
51
55
  }
52
56
 
53
- function isAuthenticated(forceLogout : boolean = false) {
57
+ function isAuthenticated() {
54
58
  if (tokenIsValid()) {
55
59
  return true
56
60
  } else {
57
- if(forceLogout){
58
- logout()
59
- }
61
+ clearAuth()
60
62
  return false
61
63
  }
62
64
 
@@ -8,8 +8,8 @@ import UserApiKeyCrudPage from '../pages/crud/UserApiKeyCrudPage.vue'
8
8
 
9
9
  const routes = [
10
10
  {
11
- name: 'Login',
12
- path: '/login',
11
+ name: 'IdentityLogin',
12
+ path: '/identity-login',
13
13
  component: LoginPage,
14
14
  meta: {
15
15
  auth: false,