mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ADF-4665] [ADF] - Application is refreshed when you have two instances of application opened (#4849)
* refactoring getValueFromToken and fix user token refresh * refactoring getValueFromToken and fix user token refresh * refactoring getValueFromToken and fix user token refres * fix unit test
This commit is contained in:
@@ -25,6 +25,7 @@ import { AppConfigService, AppConfigValues } from '../app-config/app-config.serv
|
||||
import { UserRepresentation } from '@alfresco/js-api';
|
||||
import { map, catchError, tap } from 'rxjs/operators';
|
||||
import { HttpHeaders } from '@angular/common/http';
|
||||
import { JwtHelperService } from './jwt-helper.service';
|
||||
|
||||
const REMEMBER_ME_COOKIE_KEY = 'ALFRESCO_REMEMBER_ME';
|
||||
const REMEMBER_ME_UNTIL = 1000 * 60 * 60 * 24 * 30;
|
||||
@@ -290,7 +291,7 @@ export class AuthenticationService {
|
||||
* @returns Auth token string
|
||||
*/
|
||||
getToken(): string {
|
||||
return localStorage.getItem('access_token');
|
||||
return localStorage.getItem(JwtHelperService.USER_ACCESS_TOKEN);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user