@backstage/plugin-auth-node 0.7.0-next.2 → 0.7.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.
Files changed (2) hide show
  1. package/CHANGELOG.md +37 -0
  2. package/package.json +10 -10
package/CHANGELOG.md CHANGED
@@ -1,5 +1,42 @@
1
1
  # @backstage/plugin-auth-node
2
2
 
3
+ ## 0.7.0
4
+
5
+ ### Minor Changes
6
+
7
+ - fa55078: **BREAKING**: Refactored `SignInResolverFactoryOptions` to use a schema-first generic pattern, following Zod's [recommended approach](https://zod.dev/library-authors?id=how-to-accept-user-defined-schemas#how-to-accept-user-defined-schemas) for writing generic functions. The type parameters changed from `<TAuthResult, TOptionsOutput, TOptionsInput>` to `<TAuthResult, TSchema extends ZodType>`.
8
+
9
+ This fixes "Type instantiation is excessively deep and possibly infinite" errors that occurred when the Zod version in a user's project did not align with the one in Backstage core.
10
+
11
+ If you use `createSignInResolverFactory` without explicit type parameters (the typical usage), no changes are needed:
12
+
13
+ ```ts
14
+ // This usage is unchanged
15
+ createSignInResolverFactory({
16
+ optionsSchema: z.object({ domain: z.string() }).optional(),
17
+ create(options = {}) {
18
+ /* ... */
19
+ },
20
+ });
21
+ ```
22
+
23
+ If you reference `SignInResolverFactoryOptions` with explicit type parameters, update as follows:
24
+
25
+ ```diff
26
+ - SignInResolverFactoryOptions<MyAuthResult, MyOutput, MyInput>
27
+ + SignInResolverFactoryOptions<MyAuthResult, typeof mySchema>
28
+ ```
29
+
30
+ ### Patch Changes
31
+
32
+ - 9244b70: Added `OAuthAuthenticatorLogoutResult` type. The `logout` method on `OAuthAuthenticator` can now optionally return `{ logoutUrl }` to trigger a browser redirect after sign-out. This allows providers like Auth0 to clear their session cookies by redirecting to their logout endpoint.
33
+ - Updated dependencies
34
+ - @backstage/backend-plugin-api@1.9.0
35
+ - @backstage/errors@1.3.0
36
+ - @backstage/catalog-model@1.8.0
37
+ - @backstage/catalog-client@1.15.0
38
+ - @backstage/config@1.3.7
39
+
3
40
  ## 0.7.0-next.2
4
41
 
5
42
  ### Patch Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@backstage/plugin-auth-node",
3
- "version": "0.7.0-next.2",
3
+ "version": "0.7.0",
4
4
  "backstage": {
5
5
  "role": "node-library",
6
6
  "pluginId": "auth",
@@ -38,12 +38,12 @@
38
38
  "test": "backstage-cli package test"
39
39
  },
40
40
  "dependencies": {
41
- "@backstage/backend-plugin-api": "1.9.0-next.2",
42
- "@backstage/catalog-client": "1.14.1-next.0",
43
- "@backstage/catalog-model": "1.7.8-next.0",
44
- "@backstage/config": "1.3.7-next.0",
45
- "@backstage/errors": "1.3.0-next.0",
46
- "@backstage/types": "1.2.2",
41
+ "@backstage/backend-plugin-api": "^1.9.0",
42
+ "@backstage/catalog-client": "^1.15.0",
43
+ "@backstage/catalog-model": "^1.8.0",
44
+ "@backstage/config": "^1.3.7",
45
+ "@backstage/errors": "^1.3.0",
46
+ "@backstage/types": "^1.2.2",
47
47
  "@types/express": "^4.17.6",
48
48
  "@types/passport": "^1.0.3",
49
49
  "express": "^4.22.0",
@@ -55,9 +55,9 @@
55
55
  "zod-validation-error": "^4.0.2"
56
56
  },
57
57
  "devDependencies": {
58
- "@backstage/backend-defaults": "0.16.1-next.2",
59
- "@backstage/backend-test-utils": "1.11.2-next.2",
60
- "@backstage/cli": "0.36.1-next.2",
58
+ "@backstage/backend-defaults": "^0.17.0",
59
+ "@backstage/backend-test-utils": "^1.11.2",
60
+ "@backstage/cli": "^0.36.1",
61
61
  "cookie-parser": "^1.4.6",
62
62
  "express-promise-router": "^4.1.1",
63
63
  "lodash": "^4.17.21",