chore(auth-node): allow declarative signin resolvers to take precedence

Signed-off-by: Frank Kong <frkong@redhat.com>
This commit is contained in:
Frank Kong
2024-06-14 16:55:00 -04:00
parent b6a544d265
commit 579afd0d32
2 changed files with 6 additions and 2 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-auth-node': patch
---
allow declarative sign in resolvers declared in `signInResolverFactories` to take precedence over the statically defined sign in resolvers in `signInResolver` for the `createOAuthProviderFactory`.
@@ -43,11 +43,10 @@ export function createOAuthProviderFactory<TProfile>(options: {
return ctx => {
return OAuthEnvironmentHandler.mapConfig(ctx.config, envConfig => {
const signInResolver =
options.signInResolver ??
readDeclarativeSignInResolver({
config: envConfig,
signInResolverFactories: options.signInResolverFactories ?? {},
});
}) ?? options.signInResolver;
return createOAuthRouteHandlers<TProfile>({
authenticator: options.authenticator,