@keycloakify/svelte 0.1.12 → 0.2.1
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/keycloakify-svelte/login/Template.svelte +1 -1
- package/keycloakify-svelte/login/Template.useInitialize.d.ts +3 -0
- package/keycloakify-svelte/login/Template.useInitialize.js +8 -5
- package/keycloakify-svelte/login/pages/Register.svelte +1 -1
- package/keycloakify-svelte/login/pages/SamlPostForm.svelte +1 -1
- package/keycloakify-svelte/login/pages/WebauthnError.svelte +1 -1
- package/package.json +3 -3
- package/src/login/Template.svelte +1 -1
- package/src/login/Template.useInitialize.ts +11 -5
- package/src/login/pages/Register.svelte +1 -1
- package/src/login/pages/SamlPostForm.svelte +1 -1
- package/src/login/pages/WebauthnError.svelte +1 -1
|
@@ -35,11 +35,14 @@ export function useInitialize(params) {
|
|
|
35
35
|
}))),
|
|
36
36
|
{
|
|
37
37
|
type: 'module',
|
|
38
|
-
textContent:
|
|
39
|
-
import {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
38
|
+
textContent: [
|
|
39
|
+
`import { startSessionPolling, checkAuthSession } from "${url.resourcesPath}/js/authChecker.js";`,
|
|
40
|
+
``,
|
|
41
|
+
`startSessionPolling("${kcContext.url.ssoLoginInOtherTabsUrl}");`,
|
|
42
|
+
kcContext.authenticationSession === undefined
|
|
43
|
+
? ''
|
|
44
|
+
: `checkAuthSession("${kcContext.authenticationSession.authSessionIdHash}");`,
|
|
45
|
+
].join('\n'),
|
|
43
46
|
},
|
|
44
47
|
],
|
|
45
48
|
});
|
|
@@ -110,7 +110,7 @@
|
|
|
110
110
|
)}
|
|
111
111
|
data-sitekey={recaptchaSiteKey}
|
|
112
112
|
data-callback={() => {
|
|
113
|
-
(document.getElementById('kc-register-form') as HTMLFormElement).
|
|
113
|
+
(document.getElementById('kc-register-form') as HTMLFormElement).requestSubmit();
|
|
114
114
|
}}
|
|
115
115
|
data-action={recaptchaAction}
|
|
116
116
|
type="submit"
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
// @ts-expect-error: Trusted Keycloak's code
|
|
58
58
|
document.getElementById('executionValue').value = '${execution}';
|
|
59
59
|
// @ts-expect-error: Trusted Keycloak's code
|
|
60
|
-
document.getElementById('kc-error-credential-form').
|
|
60
|
+
document.getElementById('kc-error-credential-form').requestSubmit();
|
|
61
61
|
}}
|
|
62
62
|
type="button"
|
|
63
63
|
class={kcClsx('kcButtonClass', 'kcButtonPrimaryClass', 'kcButtonBlockClass', 'kcButtonLargeClass')}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@keycloakify/svelte",
|
|
3
|
-
"version": "0.1
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"description": "Svelte Components for Keycloakify",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"keycloak",
|
|
@@ -432,7 +432,7 @@
|
|
|
432
432
|
"release": "sh scripts/release.sh"
|
|
433
433
|
},
|
|
434
434
|
"peerDependencies": {
|
|
435
|
-
"keycloakify": "^11.
|
|
435
|
+
"keycloakify": "^11.9.2",
|
|
436
436
|
"svelte": "^5.0.0"
|
|
437
437
|
},
|
|
438
438
|
"devDependencies": {
|
|
@@ -452,7 +452,7 @@
|
|
|
452
452
|
"eslint-plugin-svelte": "^3.10.1",
|
|
453
453
|
"eslint-plugin-unused-imports": "^4.1.4",
|
|
454
454
|
"globals": "^16.3.0",
|
|
455
|
-
"keycloakify": "^11.
|
|
455
|
+
"keycloakify": "^11.9.2",
|
|
456
456
|
"npm-check-updates": "^18.0.1",
|
|
457
457
|
"prettier": "^3.6.2",
|
|
458
458
|
"prettier-plugin-svelte": "^3.4.0",
|
|
@@ -11,6 +11,9 @@ export type KcContextLike = {
|
|
|
11
11
|
ssoLoginInOtherTabsUrl: string;
|
|
12
12
|
};
|
|
13
13
|
scripts?: string[];
|
|
14
|
+
authenticationSession?: {
|
|
15
|
+
authSessionIdHash: string;
|
|
16
|
+
};
|
|
14
17
|
};
|
|
15
18
|
|
|
16
19
|
assert<keyof KcContextLike extends keyof KcContext ? true : false>();
|
|
@@ -50,11 +53,14 @@ export function useInitialize(params: { kcContext: KcContextLike; doUseDefaultCs
|
|
|
50
53
|
}))),
|
|
51
54
|
{
|
|
52
55
|
type: 'module',
|
|
53
|
-
textContent:
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
56
|
+
textContent: [
|
|
57
|
+
`import { startSessionPolling, checkAuthSession } from "${url.resourcesPath}/js/authChecker.js";`,
|
|
58
|
+
``,
|
|
59
|
+
`startSessionPolling("${kcContext.url.ssoLoginInOtherTabsUrl}");`,
|
|
60
|
+
kcContext.authenticationSession === undefined
|
|
61
|
+
? ''
|
|
62
|
+
: `checkAuthSession("${kcContext.authenticationSession.authSessionIdHash}");`,
|
|
63
|
+
].join('\n'),
|
|
58
64
|
},
|
|
59
65
|
],
|
|
60
66
|
});
|
|
@@ -110,7 +110,7 @@
|
|
|
110
110
|
)}
|
|
111
111
|
data-sitekey={recaptchaSiteKey}
|
|
112
112
|
data-callback={() => {
|
|
113
|
-
(document.getElementById('kc-register-form') as HTMLFormElement).
|
|
113
|
+
(document.getElementById('kc-register-form') as HTMLFormElement).requestSubmit();
|
|
114
114
|
}}
|
|
115
115
|
data-action={recaptchaAction}
|
|
116
116
|
type="submit"
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
// @ts-expect-error: Trusted Keycloak's code
|
|
58
58
|
document.getElementById('executionValue').value = '${execution}';
|
|
59
59
|
// @ts-expect-error: Trusted Keycloak's code
|
|
60
|
-
document.getElementById('kc-error-credential-form').
|
|
60
|
+
document.getElementById('kc-error-credential-form').requestSubmit();
|
|
61
61
|
}}
|
|
62
62
|
type="button"
|
|
63
63
|
class={kcClsx('kcButtonClass', 'kcButtonPrimaryClass', 'kcButtonBlockClass', 'kcButtonLargeClass')}
|