Skip to content

Commit

Permalink
fix(ngx-auth): do not export AUTH_MANAGER injection token
Browse files Browse the repository at this point in the history
  • Loading branch information
Badisi committed Feb 28, 2022
1 parent e3d1fa7 commit 53d5316
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion projects/ngx-auth/core/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ export * from './auth.guard';
export * from './auth.interceptor';
export * from './auth.service';
export * from './auth.module';
export { AUTH_MANAGER, initAuth } from './main';
export { initAuth } from './main';
7 changes: 5 additions & 2 deletions projects/ngx-auth/core/main.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
/* eslint-disable @typescript-eslint/naming-convention */

import { InjectionToken, StaticProvider } from '@angular/core';
import { createAuthManager, Optional } from '@badisi/auth-js/core';
import { OIDCAuthManager } from '@badisi/auth-js/oidc';

import { AuthSettings } from './auth-settings.model';

// eslint-disable-next-line @typescript-eslint/naming-convention
const DEFAULT_SETTINGS: Optional<AuthSettings, 'authorityUrl' | 'clientId'> = {
automaticLoginOn401: true,
automaticInjectToken: {
Expand All @@ -15,7 +16,9 @@ const DEFAULT_SETTINGS: Optional<AuthSettings, 'authorityUrl' | 'clientId'> = {
}
};

// eslint-disable-next-line @typescript-eslint/naming-convention
/**
* @internal
*/
export const AUTH_MANAGER = new InjectionToken<string>('AUTH_MANAGER');

export const initAuth = async (settings: AuthSettings): Promise<StaticProvider> => {
Expand Down

0 comments on commit 53d5316

Please sign in to comment.