@sbc-connect/nuxt-auth 0.1.26 → 0.1.28
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/CHANGELOG.md +18 -0
- package/app/middleware/connect-auth.ts +28 -1
- package/nuxt.config.ts +2 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# @sbc-connect/nuxt-auth
|
|
2
2
|
|
|
3
|
+
## 0.1.28
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [[`c1fb4f2`](https://github.com/bcgov/connect-nuxt/commit/c1fb4f2a217b3d57e7ea7aed8b9773e215a21978)]:
|
|
8
|
+
- @sbc-connect/nuxt-base@0.1.26
|
|
9
|
+
|
|
10
|
+
## 0.1.27
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- [#85](https://github.com/bcgov/connect-nuxt/pull/85) [`6b0f70a`](https://github.com/bcgov/connect-nuxt/commit/6b0f70ab895a26c0b049dce84b130d6a04fd911e) Thanks [@kialj876](https://github.com/kialj876)! - Common layout updates, default state key for tombstone, fee store - waive fees, add prioirty, expose cached fees
|
|
15
|
+
|
|
16
|
+
- [#84](https://github.com/bcgov/connect-nuxt/pull/84) [`f37700a`](https://github.com/bcgov/connect-nuxt/commit/f37700ab568335df724a5e9472a5e0b4198704b5) Thanks [@deetz99](https://github.com/deetz99)! - feat: Add mock option to auth middleware.
|
|
17
|
+
|
|
18
|
+
- Updated dependencies [[`f37700a`](https://github.com/bcgov/connect-nuxt/commit/f37700ab568335df724a5e9472a5e0b4198704b5), [`6b0f70a`](https://github.com/bcgov/connect-nuxt/commit/6b0f70ab895a26c0b049dce84b130d6a04fd911e), [`ba04c84`](https://github.com/bcgov/connect-nuxt/commit/ba04c8424353b32af0811534d9c3edd31e15d39e)]:
|
|
19
|
+
- @sbc-connect/nuxt-base@0.1.25
|
|
20
|
+
|
|
3
21
|
## 0.1.26
|
|
4
22
|
|
|
5
23
|
### Patch Changes
|
|
@@ -3,7 +3,34 @@ export default defineNuxtRouteMiddleware((to) => {
|
|
|
3
3
|
const rtc = useRuntimeConfig().public
|
|
4
4
|
const localePath = useLocalePath()
|
|
5
5
|
|
|
6
|
-
if (!isAuthenticated.value) {
|
|
6
|
+
if (!isAuthenticated.value && !rtc.playwright) {
|
|
7
7
|
return navigateTo(localePath(`/auth/login?return=${rtc.baseUrl}${to.fullPath.slice(1)}`))
|
|
8
8
|
}
|
|
9
|
+
|
|
10
|
+
if (rtc.playwright) {
|
|
11
|
+
const { $connectAuth } = useNuxtApp()
|
|
12
|
+
const { currentAccount } = storeToRefs(useConnectAccountStore())
|
|
13
|
+
|
|
14
|
+
$connectAuth.tokenParsed = {
|
|
15
|
+
firstname: 'TestFirst',
|
|
16
|
+
lastname: 'TestLast',
|
|
17
|
+
name: 'TestFirst TestLast',
|
|
18
|
+
username: 'testUsername',
|
|
19
|
+
email: 'testEmail@test.com',
|
|
20
|
+
sub: 'test',
|
|
21
|
+
loginSource: 'IDIR',
|
|
22
|
+
realm_access: { roles: ['public_user'] }
|
|
23
|
+
}
|
|
24
|
+
$connectAuth.authenticated = true
|
|
25
|
+
|
|
26
|
+
currentAccount.value = {
|
|
27
|
+
id: 1,
|
|
28
|
+
label: 'Playwright',
|
|
29
|
+
accountStatus: AccountStatus.ACTIVE,
|
|
30
|
+
accountType: AccountType.PREMIUM,
|
|
31
|
+
type: UserSettingsType.ACCOUNT,
|
|
32
|
+
urlorigin: '',
|
|
33
|
+
urlpath: ''
|
|
34
|
+
}
|
|
35
|
+
}
|
|
9
36
|
})
|
package/nuxt.config.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sbc-connect/nuxt-auth",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.28",
|
|
5
5
|
"repository": "github:bcgov/connect-nuxt",
|
|
6
6
|
"license": "BSD-3-Clause",
|
|
7
7
|
"main": "./nuxt.config.ts",
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"typescript": "5.9.3",
|
|
14
14
|
"vue-tsc": "3.1.2",
|
|
15
15
|
"@sbc-connect/eslint-config": "0.0.8",
|
|
16
|
-
"@sbc-connect/playwright-config": "0.0.
|
|
16
|
+
"@sbc-connect/playwright-config": "0.0.8",
|
|
17
17
|
"@sbc-connect/vitest-config": "0.0.6"
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"keycloak-js": "^26.2.1",
|
|
22
22
|
"pinia": "^3.0.3",
|
|
23
23
|
"pinia-plugin-persistedstate": "^4.5.0",
|
|
24
|
-
"@sbc-connect/nuxt-base": "0.1.
|
|
24
|
+
"@sbc-connect/nuxt-base": "0.1.26"
|
|
25
25
|
},
|
|
26
26
|
"scripts": {
|
|
27
27
|
"preinstall": "npx only-allow pnpm",
|