I am also unable to impersonate logins:
Access to XMLHttpRequest at 'https://westfield.nuagecare.io/api/TokenAuth/ImpersonatedAuthenticate?impersonationToken=...' from origin 'https://westfield.nuagecare.net' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.
BIG BIG PROBLEM, PLEASE HELP
If I stay with appconfig.json I get:
ERROR SyntaxError: Unexpected token < in JSON at position 0
at JSON.parse (<anonymous>)
Hi @ryancyq, thanks for your help. I finally managed to get this working with the following settings: Core/EntityHistory/EntityHistoryConfigProvider.cs
if (!_abpStartupConfiguration.EntityHistory.IsEnabled)
{
return new Dictionary<string, object>
{
{
EntityHistoryHelper.EntityHistoryConfigurationName,
new EntityHistoryUiSetting{
IsEnabled = true
}
}
};
}
EntityFrameworkCore\EntityFrameworkCore[ProjectName]EntityFrameworkCoreModule.cs:
Configuration.EntityHistory.Selectors.Add(
new NamedTypeSelector(
"Abp.FullAuditedEntities",
type => typeof(IFullAudited).IsAssignableFrom(type)
));
// Uncomment below line to write change logs for the entities below:
Configuration.EntityHistory.Selectors.Add("NuagecareEntities", EntityHistoryHelper.TrackedTypes);
Configuration.CustomConfigProviders.Add(new EntityHistoryConfigProvider(Configuration));
angular, dotnetcore, 6.8.0 .net 4.6.1 The problem is intermittent, I will try capture the logs next time it happens (it last happenned on Sunday morning).
The name of the tenant is magdalen so that's not the problem.
Hi @maliming, unfortunately I can't share my logs because I don't save them. The last time this issue occured was Sunday morning and the logs for the date are long gone. I will keep an eye out for a re-occurence of the problem and immediately download the logs so I can post here. Can we leave the issue open until that date?
Hi maliming,
Here is my audit log for the host (I use Kendo grids so it looks a little different): IP 5.198.106.135 is the IP address for my tenant. The detail audit for the top entry reads: Parameters:
{
"model": {
"userNameOrEmailAddress": "LHUGILL",
"twoFactorVerificationCode": null,
"rememberClient": false,
"twoFactorRememberClientToken": null,
"singleSignIn": false,
"returnUrl": null
}
}
The error state reads:
Abp.UI.UserFriendlyException: Login failed!
at Nuagecare.Web.Controllers.TokenAuthController.<GetLoginResultAsync>d__32.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Nuagecare.Web.Controllers.TokenAuthController.<Authenticate>d__19.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at lambda_method(Closure , Object )
at Microsoft.Extensions.Internal.ObjectMethodExecutorAwaitable.Awaiter.GetResult()
at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.<InvokeActionMethodAsync>d__12.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.<InvokeNextActionFilterAsync>d__10.MoveNext()
The records for the same user in the AbpUserLoginAttempts table read as follows: Lines 25 to 16 show several unsuccessful attempts to sign in (all are in the host audit). Lines 15-13 show sign-ins using the same credentials using an Ionic app which keeps the tenant identifier in local storage. The user is confused and contacts her admin user who resets the passwords and then signs in using an impersonated sign-in at line 12.
What is the meaning of Result value "3"? Hoping you can help.
Hi @maliming. yes. that's exactly what I mean. The user selects the shortcut from a browser bookmark bar (Chrome), the address is tenant1.mydomain.com but when s/he signs in the system throws an error. The error appears in the audit log of the host.
Any ideas anyone?
@commondesk, sorry, that was a typo from typing code directly into the post - there is no following ) in my actual code:
{{'RequiredField' | localize, 'FirstNames' | localize}}
throws a linting error in VS Code and several errors in the console. This is the closest I can get:
{{l("RequiredField", 'Surname' | localize)}}