Skip to content

Commit

Permalink
fix: add config service in exports
Browse files Browse the repository at this point in the history
  • Loading branch information
uzenith360 committed Mar 6, 2023
1 parent f2cadd2 commit c1a51eb
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 13 deletions.
4 changes: 2 additions & 2 deletions projects/ngx-jwt-auth/src/lib/environment-config.service.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { InjectionToken } from "@angular/core";
import { EnvironmentConfig } from "./environment-config.interface";

const EnvironmentConfigService = new InjectionToken<EnvironmentConfig>('EnvironmentConfig');
export const EnvironmentConfigService = new InjectionToken<EnvironmentConfig>('EnvironmentConfig');

export default EnvironmentConfigService;
// export default EnvironmentConfigService;
22 changes: 11 additions & 11 deletions projects/ngx-jwt-auth/src/lib/jwt-auth.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ import { AuthModalComponent } from './auth-modal/auth-modal.component';
import { AuthManagerService } from './auth-manager.service';
import { AuthService } from './auth.service';
import { UserService } from './user.service';
import { JwtHelperService, JwtModule } from '@auth0/angular-jwt';
import { JwtModule } from '@auth0/angular-jwt';
import { JwtAuthService } from './jwt-auth.service';
import { AuthDialogService } from './auth-dialog.service';
import { AuthInterceptorService } from './auth-interceptor.service';
import { AuthManagerGuard } from './auth-manager.guard';
import { EnvironmentConfig } from './environment-config.interface';
import EnvironmentConfigService from './environment-config.service';
import { EnvironmentConfigService } from './environment-config.service';

@NgModule({
declarations: [
Expand All @@ -38,20 +38,20 @@ import EnvironmentConfigService from './environment-config.service';
JwtModule,
],
})
export class JwtAuthModule {
static forRoot(config: EnvironmentConfig): ModuleWithProviders<JwtAuthModule>{
export class JwtAuthModule {
static forRoot(config: EnvironmentConfig): ModuleWithProviders<JwtAuthModule> {
return {
ngModule: JwtAuthModule,
providers: [
authHttpInterceptorProvider,
AuthInterceptorService,
AuthManagerService,
JwtAuthService,
AuthDialogService,
authHttpInterceptorProvider,
AuthInterceptorService,
AuthManagerService,
JwtAuthService,
AuthDialogService,
// JwtHelperService,
AuthManagerGuard,
AuthService,
UserService,
AuthService,
UserService,
{
provide: EnvironmentConfigService,
useValue: config,
Expand Down
1 change: 1 addition & 0 deletions projects/ngx-jwt-auth/src/public-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
* Public API Surface of ngx-jwt-auth
*/

export * from './lib/environment-config.service';
export * from './lib/environment-config.interface';
export * from './lib/jwt-and-user.interface';
export * from './lib/user.interface';
Expand Down

0 comments on commit c1a51eb

Please sign in to comment.