File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
modules/authentication/src/handlers Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ import {
1717 RoutingManager ,
1818} from '@conduitplatform/module-tools' ;
1919import { authenticateChecks , changePassword } from './utils.js' ;
20+ import { Config } from '../config/index.js' ;
2021
2122export class UsernameHandlers implements IAuthenticationStrategy {
2223 constructor ( private readonly grpcSdk : ConduitGrpcSdk ) { }
@@ -64,12 +65,12 @@ export class UsernameHandlers implements IAuthenticationStrategy {
6465 }
6566
6667 async validate ( ) : Promise < boolean > {
67- const config = ConfigController . getInstance ( ) . config ;
68- if ( config . local . username . enabled ) {
69- return Promise . resolve ( true ) ;
68+ const config : Config = ConfigController . getInstance ( ) . config ;
69+ if ( config . local . username_auth_enabled ) {
70+ return true ;
7071 } else {
7172 ConduitGrpcSdk . Logger . log ( 'Username authentication not available' ) ;
72- return Promise . resolve ( false ) ;
73+ return false ;
7374 }
7475 }
7576
You can’t perform that action at this time.
0 commit comments