@flink-app/oidc-plugin 2.0.0-alpha.77 → 2.0.0-alpha.78
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
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @flink-app/oidc-plugin
|
|
2
2
|
|
|
3
|
+
## 2.0.0-alpha.78
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Fix optional chaining on providers in handlers after making providers optional
|
|
8
|
+
- @flink-app/flink@2.0.0-alpha.78
|
|
9
|
+
- @flink-app/jwt-auth-plugin@2.0.0-alpha.78
|
|
10
|
+
|
|
3
11
|
## 2.0.0-alpha.77
|
|
4
12
|
|
|
5
13
|
### Minor Changes
|
|
@@ -140,7 +140,7 @@ const CallbackOidc = async ({ ctx, req }) => {
|
|
|
140
140
|
// Store OIDC connection if token storage is enabled
|
|
141
141
|
if (options.storeTokens && user && user._id) {
|
|
142
142
|
// Get encryption secret (use provider client secret or global encryption key)
|
|
143
|
-
const staticProviderConfig = options.providers[provider];
|
|
143
|
+
const staticProviderConfig = options.providers?.[provider];
|
|
144
144
|
const encryptionSecret = options.encryptionKey || staticProviderConfig?.clientSecret;
|
|
145
145
|
if (!encryptionSecret) {
|
|
146
146
|
flink_1.log.warn("No encryption secret available, tokens will not be stored");
|
|
@@ -47,7 +47,7 @@ const InitiateOidc = async ({ ctx, req }) => {
|
|
|
47
47
|
// Get plugin options
|
|
48
48
|
const { options } = ctx.plugins.oidc;
|
|
49
49
|
// Determine redirect URI (use provided or default to callback URL)
|
|
50
|
-
const staticProviderConfig = options.providers[provider];
|
|
50
|
+
const staticProviderConfig = options.providers?.[provider];
|
|
51
51
|
const finalRedirectUri = redirectUri || staticProviderConfig?.callbackUrl || `${req.protocol}://${req.get("host")}/oidc/${provider}/callback`;
|
|
52
52
|
// Generate cryptographically secure parameters
|
|
53
53
|
const state = (0, state_utils_1.generateState)();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@flink-app/oidc-plugin",
|
|
3
|
-
"version": "2.0.0-alpha.
|
|
3
|
+
"version": "2.0.0-alpha.78",
|
|
4
4
|
"description": "Flink plugin for OIDC authentication with generic IdP support",
|
|
5
5
|
"author": "joel@frost.se",
|
|
6
6
|
"license": "MIT",
|
|
@@ -11,10 +11,10 @@
|
|
|
11
11
|
},
|
|
12
12
|
"dependencies": {
|
|
13
13
|
"openid-client": "^5.7.0",
|
|
14
|
-
"@flink-app/jwt-auth-plugin": "2.0.0-alpha.
|
|
14
|
+
"@flink-app/jwt-auth-plugin": "2.0.0-alpha.78"
|
|
15
15
|
},
|
|
16
16
|
"peerDependencies": {
|
|
17
|
-
"@flink-app/flink": ">=2.0.0-alpha.
|
|
17
|
+
"@flink-app/flink": ">=2.0.0-alpha.78",
|
|
18
18
|
"mongodb": "^6.15.0"
|
|
19
19
|
},
|
|
20
20
|
"peerDependenciesMeta": {
|
|
@@ -27,9 +27,9 @@
|
|
|
27
27
|
"@types/node": "22.13.10",
|
|
28
28
|
"ts-node": "^10.9.2",
|
|
29
29
|
"tsc-watch": "^4.2.9",
|
|
30
|
-
"@flink-app/
|
|
31
|
-
"@flink-app/test-utils": "2.0.0-alpha.
|
|
32
|
-
"@flink-app/
|
|
30
|
+
"@flink-app/jwt-auth-plugin": "2.0.0-alpha.78",
|
|
31
|
+
"@flink-app/test-utils": "2.0.0-alpha.78",
|
|
32
|
+
"@flink-app/flink": "2.0.0-alpha.78"
|
|
33
33
|
},
|
|
34
34
|
"scripts": {
|
|
35
35
|
"test": "jasmine-ts --config=./spec/support/jasmine.json",
|
|
@@ -172,7 +172,7 @@ const CallbackOidc: GetHandler<any, any, PathParams, CallbackRequest> = async ({
|
|
|
172
172
|
// Store OIDC connection if token storage is enabled
|
|
173
173
|
if (options.storeTokens && user && user._id) {
|
|
174
174
|
// Get encryption secret (use provider client secret or global encryption key)
|
|
175
|
-
const staticProviderConfig = options.providers[provider];
|
|
175
|
+
const staticProviderConfig = options.providers?.[provider];
|
|
176
176
|
const encryptionSecret = options.encryptionKey || staticProviderConfig?.clientSecret;
|
|
177
177
|
|
|
178
178
|
if (!encryptionSecret) {
|
|
@@ -61,7 +61,7 @@ const InitiateOidc: GetHandler<any, any, PathParams, InitiateRequest> = async ({
|
|
|
61
61
|
const { options } = ctx.plugins.oidc;
|
|
62
62
|
|
|
63
63
|
// Determine redirect URI (use provided or default to callback URL)
|
|
64
|
-
const staticProviderConfig = options.providers[provider];
|
|
64
|
+
const staticProviderConfig = options.providers?.[provider];
|
|
65
65
|
const finalRedirectUri = redirectUri || staticProviderConfig?.callbackUrl || `${req.protocol}://${req.get("host")}/oidc/${provider}/callback`;
|
|
66
66
|
|
|
67
67
|
// Generate cryptographically secure parameters
|