adding ms grpah client
This commit is contained in:
@@ -1,21 +1,26 @@
|
||||
import { Module, DynamicModule } from '@nestjs/common';
|
||||
import { AuthService } from './auth.service';
|
||||
import { AuthOptions } from './auth.interface';
|
||||
import { AUTH_OPTIONS } from './auth.constants';
|
||||
import { PassportModule } from '@nestjs/passport';
|
||||
import { AzureAdStrategy } from './auth.strategy';
|
||||
|
||||
@Module({})
|
||||
export class AuthModule {
|
||||
static register(options: AuthOptions): DynamicModule {
|
||||
return {
|
||||
module: AuthModule,
|
||||
imports: [
|
||||
PassportModule.register({
|
||||
defaultStrategy: 'azure-ad'
|
||||
})
|
||||
],
|
||||
providers: [
|
||||
{
|
||||
provide: AUTH_OPTIONS,
|
||||
useValue: options
|
||||
},
|
||||
AuthService
|
||||
],
|
||||
exports: [AuthService]
|
||||
AzureAdStrategy
|
||||
]
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user