Merge pull request #25254 from Zaperex/update-auth-node-signin-resolver

chore(auth-node): allow declarative signin resolvers to take precedence
This commit is contained in:
Patrik Oldsberg
2024-08-06 13:43:56 +02:00
committed by GitHub
2 changed files with 6 additions and 2 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-auth-node': minor
---
**BREAKING**: Sign-in resolvers configured via `.signIn.resolvers` now take precedence over sign-in resolvers passed to `signInResolver` option of `createOAuthProviderFactory`. This effectively makes sign-in resolvers passed via the `signInResolver` the default one, which you can then override through configuration.
@@ -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,