Version Packages (next)

This commit is contained in:
github-actions[bot]
2025-05-13 13:52:18 +00:00
parent 08438a179f
commit 1c0cb7be17
314 changed files with 4427 additions and 158 deletions
+47
View File
@@ -1,5 +1,52 @@
# @backstage/plugin-auth-node
## 0.6.3-next.2
### Patch Changes
- ab53e6f: Added a new `dangerousEntityRefFallback` option to the `signInWithCatalogUser` method in `AuthResolverContext`. The option will cause the provided entity reference to be used as a fallback in case the user is not found in the catalog. It is up to the caller to provide the fallback entity reference.
Auth providers that include pre-defined sign-in resolvers are encouraged to define a flag named `dangerouslyAllowSignInWithoutUserInCatalog` in their config, which in turn enables use of the `dangerousEntityRefFallback` option. For example:
```ts
export const usernameMatchingUserEntityName = createSignInResolverFactory({
optionsSchema: z
.object({
dangerouslyAllowSignInWithoutUserInCatalog: z.boolean().optional(),
})
.optional(),
create(options = {}) {
return async (
info: SignInInfo<OAuthAuthenticatorResult<PassportProfile>>,
ctx,
) => {
const { username } = info.result.fullProfile;
if (!username) {
throw new Error('User profile does not contain a username');
}
return ctx.signInWithCatalogUser(
{ entityRef: { name: username } },
{
dangerousEntityRefFallback:
options?.dangerouslyAllowSignInWithoutUserInCatalog
? { entityRef: { name: username } }
: undefined,
},
);
};
},
});
```
- Updated dependencies
- @backstage/backend-plugin-api@1.3.1-next.2
- @backstage/catalog-client@1.10.0-next.0
- @backstage/catalog-model@1.7.3
- @backstage/config@1.3.2
- @backstage/errors@1.2.7
- @backstage/types@1.2.1
## 0.6.3-next.1
### Patch Changes
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@backstage/plugin-auth-node",
"version": "0.6.3-next.1",
"version": "0.6.3-next.2",
"backstage": {
"role": "node-library",
"pluginId": "auth",