@backstage/core-app-api 1.5.1-next.1 → 1.6.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,60 @@
1
1
  # @backstage/core-app-api
2
2
 
3
+ ## 1.6.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 456eaa8cf83: `OAuth2` now gets ID tokens from a session with the `openid` scope explicitly
8
+ requested.
9
+
10
+ This should not be considered a breaking change, because spec-compliant OIDC
11
+ providers will already be returning ID tokens if and only if the `openid` scope
12
+ is granted.
13
+
14
+ This change makes the dependence explicit, and removes the burden on
15
+ OAuth2-based providers which require an ID token (e.g. this is done by various
16
+ default [auth
17
+ handlers](https://backstage.io/docs/auth/identity-resolver/#authhandler)) to add
18
+ `openid` to their default scopes. _That_ could carry another indirect benefit:
19
+ by removing `openid` from the default scopes for a provider, grants for
20
+ resource-specific access tokens can avoid requesting excess ID token-related
21
+ scopes.
22
+
23
+ ### Patch Changes
24
+
25
+ - 52b0022dab7: Updated dependency `msw` to `^1.0.0`.
26
+ - Updated dependencies
27
+ - @backstage/core-plugin-api@1.5.0
28
+ - @backstage/config@1.0.7
29
+ - @backstage/types@1.0.2
30
+ - @backstage/version-bridge@1.0.3
31
+
32
+ ## 1.6.0-next.2
33
+
34
+ ### Minor Changes
35
+
36
+ - 456eaa8cf83: `OAuth2` now gets ID tokens from a session with the `openid` scope explicitly
37
+ requested.
38
+
39
+ This should not be considered a breaking change, because spec-compliant OIDC
40
+ providers will already be returning ID tokens if and only if the `openid` scope
41
+ is granted.
42
+
43
+ This change makes the dependence explicit, and removes the burden on
44
+ OAuth2-based providers which require an ID token (e.g. this is done by various
45
+ default [auth
46
+ handlers](https://backstage.io/docs/auth/identity-resolver/#authhandler)) to add
47
+ `openid` to their default scopes. _That_ could carry another indirect benefit:
48
+ by removing `openid` from the default scopes for a provider, grants for
49
+ resource-specific access tokens can avoid requesting excess ID token-related
50
+ scopes.
51
+
52
+ ### Patch Changes
53
+
54
+ - Updated dependencies
55
+ - @backstage/core-plugin-api@1.5.0-next.2
56
+ - @backstage/config@1.0.7-next.0
57
+
3
58
  ## 1.5.1-next.1
4
59
 
5
60
  ### Patch Changes
package/dist/index.esm.js CHANGED
@@ -839,7 +839,10 @@ class OAuth2 {
839
839
  }
840
840
  async getIdToken(options = {}) {
841
841
  var _a;
842
- const session = await this.sessionManager.getSession(options);
842
+ const session = await this.sessionManager.getSession({
843
+ ...options,
844
+ scopes: /* @__PURE__ */ new Set(["openid"])
845
+ });
843
846
  return (_a = session == null ? void 0 : session.providerInfo.idToken) != null ? _a : "";
844
847
  }
845
848
  async getBackstageIdentity(options = {}) {