diff --git a/registrants/src/UI/embc-registrant/src/app/core/services/login.service.ts b/registrants/src/UI/embc-registrant/src/app/core/services/login.service.ts index 7c3c03cdf..dfe40f25e 100644 --- a/registrants/src/UI/embc-registrant/src/app/core/services/login.service.ts +++ b/registrants/src/UI/embc-registrant/src/app/core/services/login.service.ts @@ -20,9 +20,16 @@ export class LoginService { public async login(targetUrl: string = undefined): Promise { return await this.oauthService.tryLoginImplicitFlow().then(() => { if (!this.oauthService.hasValidAccessToken()) { - this.oauthService.initImplicitFlow(targetUrl); - this.isLoggedIn$.next(false); - return Promise.resolve(false); + if (targetUrl == '/verified-registration') { + this.oauthService.initImplicitFlow(targetUrl); + this.isLoggedIn$.next(false); + return Promise.resolve(false); + } + else { + this.router.navigateByUrl('/'); + this.isLoggedIn$.next(false); + return Promise.resolve(false); + } } this.isLoggedIn$.next(true); return Promise.resolve(true);