Skip to content

Commit

Permalink
Merge pull request #226 from vishnubansaltarento/kar-202-logout-issue
Browse files Browse the repository at this point in the history
Kar 202 logout issue
  • Loading branch information
vishnubansaltarento authored May 24, 2024
2 parents 492aca9 + 07dda53 commit 151dfb3
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/app/services/init.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -497,7 +497,8 @@ export class InitService {
localStorage.setItem('login', 'true')
} else {
// this.authSvc.force_logout()
await this.http.get('/apis/reset').toPromise()
// await this.http.get('/apis/reset').toPromise()
window.location.href = `${this.defaultRedirectUrl}apis/reset`
}
const details = {
group: [],
Expand Down Expand Up @@ -541,4 +542,13 @@ export class InitService {
})
return returnValue
}

private get defaultRedirectUrl(): string {
try {
const baseUrl = document.baseURI
return baseUrl || location.origin
} catch (error) {
return location.origin
}
}
}

0 comments on commit 151dfb3

Please sign in to comment.