Skip to content

Fix error with ambient type when running Universal #853

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 30, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion projects/lib/src/oauth-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ export class OAuthService extends AuthConfig implements OnDestroy {
protected inImplicitFlow = false;

protected saveNoncesInLocalStorage = false;
private document: Document;

constructor(
protected ngZone: NgZone,
Expand All @@ -112,12 +113,15 @@ export class OAuthService extends AuthConfig implements OnDestroy {
protected urlHelper: UrlHelperService,
protected logger: OAuthLogger,
@Optional() protected crypto: HashHandler,
@Inject(DOCUMENT) private document: Document
@Inject(DOCUMENT) document: any
) {
super();

this.debug('angular-oauth2-oidc v8-beta');

// See https://github.com/manfredsteyer/angular-oauth2-oidc/issues/773 for why this is needed
this.document = document;

this.discoveryDocumentLoaded$ = this.discoveryDocumentLoadedSubject.asObservable();
this.events = this.eventsSubject.asObservable();

Expand Down