我有一个问题,但只有在运行时进行生产构建之后。现在,我不确定这是错误还是执行错误。我收到错误信息““ TypeError:无法读取未定义的属性'release'”。在控制台(浏览器)中,如果我使用ngrx加载以下功能模块(在运行时):
import { AccountDto } from '../../../dto';
import * as fromAccountActions from '../actions/account.actions';
export interface AccountState {
loading: boolean;
loaded: boolean;
accountItems: AccountDto[];
}
export const initialState: AccountState = {
loading: false,
loaded: false,
accountItems: []
};
export function accountReducer(
state = initialState,
action: fromAccountActions.AccountActions
): AccountState {
switch (action.type) {
case fromAccountActions.LOAD_ACCOUNT: {
// console.log(action.type);
return { ...state, loading: true };
}
case fromAccountActions.LOAD_ACCOUNT_FINISHED: {
console.log('Finished: ' + action.payload);
return {
...state,
loading: false,
loaded: true,
accountItems: action.payload …Run Code Online (Sandbox Code Playgroud) 我正在使用 angular-oauth2-oidc 进行身份验证,但我不知道如何获取访问令牌。我正在使用具有此配置的 PKCE 代码流
authConfig: AuthConfig = {
issuer: 'https://test.com/oauth/token',
// requireHttps: false,
redirectUri:'http://localhost:4200/',
strictDiscoveryDocumentValidation: false,
tokenEndpoint: 'https://test.com/oauth/token',
clientId: 'test',
// dummyClientSecret: 'test',
scope: 'openid',
oidc: true,
responseType: 'code',
showDebugInformation: true,
requestAccessToken: true
};
Run Code Online (Sandbox Code Playgroud)
流程是使用此代码启动的,登录后它会被重定向,但我无法获得任何令牌。
getAutherizationCodeWithPKCE() {
this.oauthService.configure(this.authConfig);
this.oauthService.initCodeFlow();
this.oauthService.loadDiscoveryDocumentAndTryLogin
}
Run Code Online (Sandbox Code Playgroud)