oauth2 fixes

This commit is contained in:
Willem Dantuma 2021-10-05 20:56:27 +02:00
parent ba541c4e08
commit eabaa1db19
6 changed files with 9 additions and 7 deletions

View File

@ -4,7 +4,7 @@
"lib": {
"entryFile": "src/public-api.ts"
},
"whitelistedNonPeerDependencies": [
"allowedNonPeerDependencies": [
"."
]
}

View File

@ -1,7 +1,7 @@
<div class="card border-0">
<div class="card-body">
<fm-back-button></fm-back-button>
<h3><i class="fm fm-farm"></i>&nbsp;<span i18n>Farms</span></h3>
<h3><i class="far fa-farm"></i>&nbsp;<span i18n>Farms</span></h3>
<div *ngIf="features;let features">
<div class="farms">
<div class="row m-0 pl-3 pr-3" *ngFor="let feature of features"[ngClass]="{'selected':isFeatureSelected(feature)}" (click)="handleFeatureClick(feature)" (mouseenter)="handleFeatureMouseEnter(feature)" (mouseleave)="handleFeatureMouseLeave(feature)">

View File

@ -7,7 +7,7 @@
"my-data": "my-data"
}
},
"whitelistedNonPeerDependencies": [
"allowedNonPeerDependencies": [
"."
]
}

View File

@ -16,7 +16,7 @@
"bootstrap": "^4.4.1",
"@microsoft/signalr": "^3.1.3",
"ngx-uploadx": "^3.3.4",
"angular-oauth2-oidc": "^10.0.3",
"angular-oauth2-oidc": "^12.0",
"moment": "^2.27.0",
"ngx-avatar": "^4.0.0",
"ngx-image-cropper": "^3.3.5",

View File

@ -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 ?

View File

@ -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
};