@backstage/plugin-auth-backend 0.4.10 → 0.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 +80 -0
- package/dist/index.cjs.js +1319 -1220
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +252 -117
- package/package.json +7 -8
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,85 @@
|
|
|
1
1
|
# @backstage/plugin-auth-backend
|
|
2
2
|
|
|
3
|
+
## 0.6.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- c88cdacc1a: Avoid ever returning OAuth refresh tokens back to the client, and always exchange refresh tokens for a new one when available for all providers.
|
|
8
|
+
|
|
9
|
+
This comes with a breaking change to the TypeScript API for custom auth providers. The `refresh` method of `OAuthHandlers` implementation must now return a `{ response, refreshToken }` object rather than a direct response. Existing `refresh` implementations are typically migrated by changing an existing return expression that looks like this:
|
|
10
|
+
|
|
11
|
+
```ts
|
|
12
|
+
return await this.handleResult({
|
|
13
|
+
fullProfile,
|
|
14
|
+
params,
|
|
15
|
+
accessToken,
|
|
16
|
+
refreshToken,
|
|
17
|
+
});
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
Into the following:
|
|
21
|
+
|
|
22
|
+
```ts
|
|
23
|
+
return {
|
|
24
|
+
response: await this.handleResult({
|
|
25
|
+
fullProfile,
|
|
26
|
+
params,
|
|
27
|
+
accessToken,
|
|
28
|
+
}),
|
|
29
|
+
refreshToken,
|
|
30
|
+
};
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
### Patch Changes
|
|
34
|
+
|
|
35
|
+
- f0f81f6cc7: Replaces the usage of `got` with `node-fetch` in the `getUserPhoto` method of the Microsoft provider
|
|
36
|
+
- 2f26120a36: Update `auth0` and `onelogin` providers to allow for `authHandler` and `signIn.resolver` configuration.
|
|
37
|
+
- a9abafa9df: Fixed bug on refresh token on Okta provider, now it gets the refresh token and it sends it into providerInfo
|
|
38
|
+
- eb48e78886: Enforce cookie SSL protection when in production for auth-backend sessions
|
|
39
|
+
- Updated dependencies
|
|
40
|
+
- @backstage/test-utils@0.2.1
|
|
41
|
+
- @backstage/backend-common@0.10.1
|
|
42
|
+
|
|
43
|
+
## 0.5.2
|
|
44
|
+
|
|
45
|
+
### Patch Changes
|
|
46
|
+
|
|
47
|
+
- 24a67e3e2e: Fixed the fallback identity population to correctly generate an entity reference for `userEntityRef` if no token is provided.
|
|
48
|
+
- Updated dependencies
|
|
49
|
+
- @backstage/backend-common@0.10.0
|
|
50
|
+
- @backstage/test-utils@0.2.0
|
|
51
|
+
- @backstage/catalog-client@0.5.3
|
|
52
|
+
|
|
53
|
+
## 0.5.1
|
|
54
|
+
|
|
55
|
+
### Patch Changes
|
|
56
|
+
|
|
57
|
+
- 699c2e9ddc: export minimal typescript types for OIDC provider
|
|
58
|
+
- Updated dependencies
|
|
59
|
+
- @backstage/backend-common@0.9.14
|
|
60
|
+
- @backstage/catalog-model@0.9.8
|
|
61
|
+
|
|
62
|
+
## 0.5.0
|
|
63
|
+
|
|
64
|
+
### Minor Changes
|
|
65
|
+
|
|
66
|
+
- a036b65c2f: **BREAKING CHANGE** The `idToken` field of `BackstageIdentity` has been removed, with the `token` taking its place. This means you may need to update existing `signIn.resolver` implementations to return an `token` rather than an `idToken`. This also applies to custom auth providers.
|
|
67
|
+
|
|
68
|
+
The `BackstageIdentity` type has been deprecated and will be removed in the future. Taking its place is the new `BackstageSignInResult` type with the same shape.
|
|
69
|
+
|
|
70
|
+
This change also introduces the new `BackstageIdentityResponse` that mirrors the type with the same name from `@backstage/core-plugin-api`. The `BackstageIdentityResponse` type is different from the `BackstageSignInResult` in that it also has a `identity` field which is of type `BackstageUserIdentity` and is a decoded version of the information within the token.
|
|
71
|
+
|
|
72
|
+
When implementing a custom auth provider that is not based on the `OAuthAdapter` you may need to convert `BackstageSignInResult` into a `BackstageIdentityResponse`, this can be done using the new `prepareBackstageIdentityResponse` function.
|
|
73
|
+
|
|
74
|
+
### Patch Changes
|
|
75
|
+
|
|
76
|
+
- 8f461e6043: Fixes potential bug introduced in `0.4.10` which causes `OAuth2AuthProvider` to authenticate using credentials in both POST payload and headers.
|
|
77
|
+
This might break some stricter OAuth2 implementations so there is now a `includeBasicAuth` config option that can manually be set to `true` to enable this behavior.
|
|
78
|
+
- dcd1a0c3f4: Minor improvement to the API reports, by not unpacking arguments directly
|
|
79
|
+
- Updated dependencies
|
|
80
|
+
- @backstage/test-utils@0.1.24
|
|
81
|
+
- @backstage/backend-common@0.9.13
|
|
82
|
+
|
|
3
83
|
## 0.4.10
|
|
4
84
|
|
|
5
85
|
### Patch Changes
|