solved unauthorized rockect chat url

This commit is contained in:
tiago.kayaya
2021-10-05 10:18:38 +01:00
parent 3f99ea222c
commit 5d4490e287
8 changed files with 34 additions and 30 deletions
+3 -1
View File
@@ -65,7 +65,7 @@ export class AuthService {
}
SetSession(response: LoginUserRespose, user:UserForm) {
const session: UserSession = Object.assign(SessionStore.user, response)
const session: UserSession = Object.assign(SessionStore.user, response)
if (response) {
if( session.RoleID == 100000014) {
@@ -102,6 +102,8 @@ export class AuthService {
console.log('Login to Rocket chat OK');
this.ValidatedUserChat = responseChat;
localStorage.setItem('userChat', JSON.stringify(responseChat));
localStorage.setItem('Meteor.loginToken', JSON.stringify(responseChat['data'].userId));
localStorage.setItem('Meteor.userId', JSON.stringify(responseChat['data'].authToken));
this.storageService.store(AuthConnstants.AUTH, responseChat);
return true;
}