Closed shaunluttin closed 7 years ago
These are the errors we receive with different attempts at a login NavigationStrategy
in Chrome.
// TypeError: Cannot read property 'trim' of undefined at relativeToFile
return this.openIdConnectNavigationStrategies.login(instruction);
// TypeError: Cannot read property '__useDefault' of undefined at ensureOriginOnExports
instruction.config.moduleId = "";
return this.openIdConnectNavigationStrategies.login(instruction);
// TypeError: Invalid Route Config: Configuration for viewPort "default" was not found for route: "login."
instruction.config.viewPorts = "";
return this.openIdConnectNavigationStrategies.login(instruction);
// Warning: A promise was rejected with a non-error.
instruction.config.redirect = "";
return this.openIdConnectNavigationStrategies.login(instruction);
// Warning: A promise was rejected with a non-error.
instruction.config.redirect = "";
return this.openIdConnectNavigationStrategies.login(instruction);
These are the errors we receive with different attempts at a logout NavigationStrategy
.
// TypeError: Cannot read property 'then' of undefined at OpenIdConnectNavigationStrategies.runHandlers
instruction.config.redirect = "";
return this.openIdConnectNavigationStrategies.logout(instruction);
Resolution:
We needed to return the promise here:
public signoutRedirectCallback(instruction: NavigationInstruction): Promise<any> {
let callbackHandler: Function = () => {
let args: any = {};
return this.userManager.signoutRedirectCallback(args); // this is where we needed to return
};
let postCallbackRedirect: Function = () => {
instruction.config.moduleId = this.openIdConnectConfiguration.logoutRedirectModuleId;
};
return this.runHandlers(callbackHandler, postCallbackRedirect);
}
At this point, we are receiving the Warning: A promise was rejected with a non-error
message. It seems that the Aurelia recommendation is to ignore these warnings.