Newer
Older
import {Component} from '@angular/core';
import {OAuthService} from 'angular-oauth2-oidc';
@Component({
selector: 'dlcm-root',
templateUrl: './app.component.html',
})
export class AppComponent {
title = 'DLCM-Frontend';
this.checkTokenInUrl();
}
private checkTokenInUrl() {
// This method just tries to parse the token(s) within the url when
// the auth-server redirects the user back to the web-app
// It doesn't send the user the the login page
// this.oauthService.tryLogin();
const option = {
disableOAuth2StateCheck: true,
};
this.oauthService.tryLogin(option);