@flink-app/oidc-plugin 2.0.0-alpha.73 → 2.0.0-alpha.74

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,14 @@
1
1
  # @flink-app/oidc-plugin
2
2
 
3
+ ## 2.0.0-alpha.74
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+ - Updated dependencies
9
+ - @flink-app/flink@2.0.0-alpha.74
10
+ - @flink-app/jwt-auth-plugin@2.0.0-alpha.74
11
+
3
12
  ## 2.0.0-alpha.73
4
13
 
5
14
  ### Patch Changes
package/README.md CHANGED
@@ -500,7 +500,7 @@ onAuthSuccess: async ({ profile, claims }, ctx) => {
500
500
  subject: claims.sub,
501
501
  provider: "acme",
502
502
  });
503
- await ctx.repos.userRepo.updateOne(user._id, {
503
+ await ctx.repos.userRepo.updateById(user._id, {
504
504
  oidcConnections: user.oidcConnections,
505
505
  });
506
506
  } else {
@@ -552,7 +552,7 @@ onAuthSuccess: async ({ profile, claims }, ctx) => {
552
552
  });
553
553
  } else {
554
554
  // Update roles on each login
555
- await ctx.repos.userRepo.updateOne(user._id, { roles });
555
+ await ctx.repos.userRepo.updateById(user._id, { roles });
556
556
  }
557
557
 
558
558
  const token = await ctx.plugins.jwtAuth.createToken({ userId: user._id }, roles);
@@ -155,7 +155,7 @@ const CallbackOidc = async ({ ctx, req }) => {
155
155
  // Create or update OIDC connection
156
156
  const existingConnection = await ctx.repos.oidcConnectionRepo.findByUserAndProvider(user._id, provider);
157
157
  if (existingConnection) {
158
- await ctx.repos.oidcConnectionRepo.updateOne(existingConnection._id, {
158
+ await ctx.repos.oidcConnectionRepo.updateById(existingConnection._id, {
159
159
  accessToken: encryptedAccessToken,
160
160
  idToken: encryptedIdToken,
161
161
  refreshToken: encryptedRefreshToken,
@@ -86,7 +86,7 @@ async function start() {
86
86
  provider,
87
87
  });
88
88
 
89
- await ctx.repos.userRepo.updateOne(user._id, {
89
+ await ctx.repos.userRepo.updateById(user._id, {
90
90
  oidcConnections: user.oidcConnections,
91
91
  });
92
92
  } else {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flink-app/oidc-plugin",
3
- "version": "2.0.0-alpha.73",
3
+ "version": "2.0.0-alpha.74",
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.73"
14
+ "@flink-app/jwt-auth-plugin": "2.0.0-alpha.74"
15
15
  },
16
16
  "peerDependencies": {
17
- "@flink-app/flink": ">=2.0.0-alpha.73",
17
+ "@flink-app/flink": ">=2.0.0-alpha.74",
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/flink": "2.0.0-alpha.73",
31
- "@flink-app/jwt-auth-plugin": "2.0.0-alpha.73",
32
- "@flink-app/test-utils": "2.0.0-alpha.73"
30
+ "@flink-app/flink": "2.0.0-alpha.74",
31
+ "@flink-app/test-utils": "2.0.0-alpha.74",
32
+ "@flink-app/jwt-auth-plugin": "2.0.0-alpha.74"
33
33
  },
34
34
  "scripts": {
35
35
  "test": "jasmine-ts --config=./spec/support/jasmine.json",
@@ -190,7 +190,7 @@ const CallbackOidc: GetHandler<any, any, PathParams, CallbackRequest> = async ({
190
190
  const existingConnection = await ctx.repos.oidcConnectionRepo.findByUserAndProvider(user._id, provider);
191
191
 
192
192
  if (existingConnection) {
193
- await ctx.repos.oidcConnectionRepo.updateOne(existingConnection._id!, {
193
+ await ctx.repos.oidcConnectionRepo.updateById(existingConnection._id!, {
194
194
  accessToken: encryptedAccessToken,
195
195
  idToken: encryptedIdToken,
196
196
  refreshToken: encryptedRefreshToken,