@backstage/core-app-api 1.5.1-next.0 → 1.6.0-next.2

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,42 @@
1
1
  # @backstage/core-app-api
2
2
 
3
+ ## 1.6.0-next.2
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
+ - Updated dependencies
26
+ - @backstage/core-plugin-api@1.5.0-next.2
27
+ - @backstage/config@1.0.7-next.0
28
+
29
+ ## 1.5.1-next.1
30
+
31
+ ### Patch Changes
32
+
33
+ - 52b0022dab7: Updated dependency `msw` to `^1.0.0`.
34
+ - Updated dependencies
35
+ - @backstage/core-plugin-api@1.4.1-next.1
36
+ - @backstage/config@1.0.7-next.0
37
+ - @backstage/types@1.0.2
38
+ - @backstage/version-bridge@1.0.3
39
+
3
40
  ## 1.5.1-next.0
4
41
 
5
42
  ### 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 = {}) {