@backstage/plugin-auth-backend 0.13.0-next.0 → 0.13.0-next.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 +8 -0
- package/dist/index.cjs.js +4 -4
- package/dist/index.cjs.js.map +1 -1
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @backstage/plugin-auth-backend
|
|
2
2
|
|
|
3
|
+
## 0.13.0-next.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- a45bce06e3: Handle trailing slashes on GitHub `enterpriseInstanceUrl` settings
|
|
8
|
+
- Updated dependencies
|
|
9
|
+
- @backstage/backend-common@0.13.2-next.1
|
|
10
|
+
|
|
3
11
|
## 0.13.0-next.0
|
|
4
12
|
|
|
5
13
|
### Minor Changes
|
package/dist/index.cjs.js
CHANGED
|
@@ -1270,10 +1270,10 @@ const createGithubProvider = (options) => {
|
|
|
1270
1270
|
catalogApi,
|
|
1271
1271
|
logger
|
|
1272
1272
|
}) => OAuthEnvironmentHandler.mapConfig(config, (envConfig) => {
|
|
1273
|
-
var _a, _b, _c;
|
|
1273
|
+
var _a, _b, _c, _d;
|
|
1274
1274
|
const clientId = envConfig.getString("clientId");
|
|
1275
1275
|
const clientSecret = envConfig.getString("clientSecret");
|
|
1276
|
-
const enterpriseInstanceUrl = envConfig.getOptionalString("enterpriseInstanceUrl");
|
|
1276
|
+
const enterpriseInstanceUrl = (_a = envConfig.getOptionalString("enterpriseInstanceUrl")) == null ? void 0 : _a.replace(/\/$/, "");
|
|
1277
1277
|
const customCallbackUrl = envConfig.getOptionalString("callbackUrl");
|
|
1278
1278
|
const authorizationUrl = enterpriseInstanceUrl ? `${enterpriseInstanceUrl}/login/oauth/authorize` : void 0;
|
|
1279
1279
|
const tokenUrl = enterpriseInstanceUrl ? `${enterpriseInstanceUrl}/login/oauth/access_token` : void 0;
|
|
@@ -1286,13 +1286,13 @@ const createGithubProvider = (options) => {
|
|
|
1286
1286
|
const authHandler = (options == null ? void 0 : options.authHandler) ? options.authHandler : async ({ fullProfile }) => ({
|
|
1287
1287
|
profile: makeProfileInfo(fullProfile)
|
|
1288
1288
|
});
|
|
1289
|
-
const signInResolverFn = (
|
|
1289
|
+
const signInResolverFn = (_c = (_b = options == null ? void 0 : options.signIn) == null ? void 0 : _b.resolver) != null ? _c : githubDefaultSignInResolver;
|
|
1290
1290
|
const signInResolver = (info) => signInResolverFn(info, {
|
|
1291
1291
|
catalogIdentityClient,
|
|
1292
1292
|
tokenIssuer,
|
|
1293
1293
|
logger
|
|
1294
1294
|
});
|
|
1295
|
-
const stateEncoder = (
|
|
1295
|
+
const stateEncoder = (_d = options == null ? void 0 : options.stateEncoder) != null ? _d : async (req) => {
|
|
1296
1296
|
return { encodedState: encodeState(req.state) };
|
|
1297
1297
|
};
|
|
1298
1298
|
const provider = new GithubAuthProvider({
|