@backstage/plugin-auth-backend 0.18.1-next.1 → 0.18.1

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,31 @@
1
1
  # @backstage/plugin-auth-backend
2
2
 
3
+ ## 0.18.1
4
+
5
+ ### Patch Changes
6
+
7
+ - e262738b8a0: Handle difference in expiration time between Microsoft session and Backstage session which caused the Backstage token to be invalid during a time frame.
8
+ - 86cece2c1fb: Updated dependency `@types/passport-microsoft` to `^1.0.0`.
9
+ - 52b0022dab7: Updated dependency `msw` to `^1.0.0`.
10
+ - 529de8c4211: Added authentication provider for Azure Easy Authentication.
11
+ - Updated dependencies
12
+ - @backstage/catalog-client@1.4.0
13
+ - @backstage/plugin-auth-node@0.2.12
14
+ - @backstage/backend-common@0.18.3
15
+ - @backstage/errors@1.1.5
16
+ - @backstage/catalog-model@1.2.1
17
+ - @backstage/config@1.0.7
18
+ - @backstage/types@1.0.2
19
+
20
+ ## 0.18.1-next.2
21
+
22
+ ### Patch Changes
23
+
24
+ - Updated dependencies
25
+ - @backstage/plugin-auth-node@0.2.12-next.2
26
+ - @backstage/backend-common@0.18.3-next.2
27
+ - @backstage/config@1.0.7-next.0
28
+
3
29
  ## 0.18.1-next.1
4
30
 
5
31
  ### Patch Changes
package/dist/index.cjs.js CHANGED
@@ -1436,7 +1436,7 @@ const gcpIap = createAuthProviderIntegration({
1436
1436
  });
1437
1437
 
1438
1438
  const ACCESS_TOKEN_PREFIX = "access-token.";
1439
- const BACKSTAGE_SESSION_EXPIRATION = 3600;
1439
+ const BACKSTAGE_SESSION_EXPIRATION$1 = 3600;
1440
1440
  class GithubAuthProvider {
1441
1441
  constructor(options) {
1442
1442
  this.signInResolver = options.signInResolver;
@@ -1530,10 +1530,10 @@ class GithubAuthProvider {
1530
1530
  if (expiresInSeconds) {
1531
1531
  expiresInSeconds = Math.min(
1532
1532
  expiresInSeconds,
1533
- BACKSTAGE_SESSION_EXPIRATION
1533
+ BACKSTAGE_SESSION_EXPIRATION$1
1534
1534
  );
1535
1535
  } else {
1536
- expiresInSeconds = BACKSTAGE_SESSION_EXPIRATION;
1536
+ expiresInSeconds = BACKSTAGE_SESSION_EXPIRATION$1;
1537
1537
  }
1538
1538
  }
1539
1539
  return {
@@ -1858,6 +1858,7 @@ const google = createAuthProviderIntegration({
1858
1858
  }
1859
1859
  });
1860
1860
 
1861
+ const BACKSTAGE_SESSION_EXPIRATION = 3600;
1861
1862
  class MicrosoftAuthProvider {
1862
1863
  constructor(options) {
1863
1864
  this.signInResolver = options.signInResolver;
@@ -1914,12 +1915,13 @@ class MicrosoftAuthProvider {
1914
1915
  const photo = await this.getUserPhoto(result.accessToken);
1915
1916
  result.fullProfile.photos = photo ? [{ value: photo }] : void 0;
1916
1917
  const { profile } = await this.authHandler(result, this.resolverContext);
1918
+ const expiresInSeconds = result.params.expires_in === void 0 ? BACKSTAGE_SESSION_EXPIRATION : Math.min(result.params.expires_in, BACKSTAGE_SESSION_EXPIRATION);
1917
1919
  const response = {
1918
1920
  providerInfo: {
1919
1921
  idToken: result.params.id_token,
1920
1922
  accessToken: result.accessToken,
1921
1923
  scope: result.params.scope,
1922
- expiresInSeconds: result.params.expires_in
1924
+ expiresInSeconds
1923
1925
  },
1924
1926
  profile
1925
1927
  };