oauth2 fixes
This commit is contained in:
@@ -40,6 +40,7 @@ export class AvatarComponent implements OnInit {
|
||||
|
||||
refresh(user: IUser) {
|
||||
if (!user) return null;
|
||||
debugger;
|
||||
const apiEndpoint = this.appConfig.getConfig("apiEndPoint");
|
||||
this.src = `${apiEndpoint}/api/v1/users/${user.code}/avatar`;
|
||||
this.name = user.firstName && user.lastName ?
|
||||
|
@@ -8,6 +8,7 @@ import { createSelector, createFeatureSelector, ActionReducerMap } from '@ngrx/s
|
||||
|
||||
import { MODULE_NAME } from '../module-name';
|
||||
import { IItem } from '../models/item';
|
||||
import { userInfo } from 'os';
|
||||
|
||||
export interface State {
|
||||
openedModalName: string,
|
||||
@@ -57,13 +58,13 @@ export function reducer(state = initialState, action: appCommonActions.Actions )
|
||||
case appCommonActions.INITUSERSUCCESS: {
|
||||
let a = action as appCommonActions.InitUserSuccess;
|
||||
let claims = {}
|
||||
Object.getOwnPropertyNames(a.userinfo).forEach((k) => {
|
||||
Object.getOwnPropertyNames(a.userinfo.info).forEach((k) => {
|
||||
claims[k] = a.userinfo[k];
|
||||
});
|
||||
var user:IUser = {
|
||||
code:a.user.code,
|
||||
email:a.userinfo["email"],
|
||||
name:a.userinfo["name"],
|
||||
email:a.user?.name?a.user.name : claims["email"],
|
||||
name:a.user?.email?a.user.email : claims["name"],
|
||||
claims:claims,
|
||||
searchable: false
|
||||
};
|
||||
|
Reference in New Issue
Block a user