chore(auth-node): allow declarative signin resolvers to take precedence
Signed-off-by: Frank Kong <frkong@redhat.com>
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user