Hi @ismcagdas,
Thanks v much for your suggestion, it is working fine in my local.
Hi AspnetZero support team,
Product version -10.2.0 Product type - Angular Product framework type - .Net Core
Facing a problem in 2FA. When user apply 2FA, it works fine for first time. But if user disables the 2FA and re-enables it, then while login it is hitting the exception in TokenAuthController.cs.
throw new UserFriendlyException(L("SendSecurityCodeErrorMessage"));
Since it is problem in CacheManager, if I restart the App/ debugging session, the issue will go off, but again appears if user repeat the steps.
Code is:
public async Task SendTwoFactorAuthCode([FromBody] SendTwoFactorAuthCodeModel model)
{
var cacheKey = new UserIdentifier(AbpSession.TenantId, model.UserId).ToString();
var cacheItem = await _cacheManager
.GetTwoFactorCodeCache()
.GetOrDefaultAsync(cacheKey);
if (cacheItem == null)
{
//There should be a cache item added in Authenticate method! This check is needed to prevent sending unwanted two factor code to users.
throw new UserFriendlyException(L("SendSecurityCodeErrorMessage"));
}
//Continue...
}
Could you please advice?
Hi - how does this relate to Asp.Net Zero v10.2?
Thanks for your very good answer, much appreciated.
It seems that the main difference is removing the gulp buildDev
command from npm run start
, thus re-using the output from gulp buildDev
.
Can we also re-use the output from gulp build
?
Merhaba,
We have just upgraded to ASP.NET Zero version 10.2 and overall the new version is great. Previously we were using v8.1
The new version has much slower build times for the angular client.
Our typical build time now (for v10.2) is around 30minutes.
We are using Azure DevOps to perform the build, and using the ubuntu-latest agent. The specifics about these agents can be found here: https://docs.microsoft.com/en-us/azure/devops/pipelines/agents/hosted?view=azure-devops&tabs=yaml https://docs.microsoft.com/en-us/azure/virtual-machines/dv2-dsv2-series#dsv2-series
What is the expected build time for client?
Hi,
I see that your code sets cookies as follows:
UtilsService().setCookieValue();
How are we meant to set the SameSite attribute for these coookies.
eg
private static setEncryptedTokenCookie(encryptedToken: string) {
new UtilsService().setCookieValue(AppConsts.authorization.encrptedAuthTokenName,
encryptedToken,
new Date(new Date().getTime() + 365 * 86400000), //1 year
abp.appPath
);
}
This appears an important issue - yet I have seen no advisiory from you on it. Is our Website going to stop working soon?
What do I need to do to get the ABP SetCookieValue() code to comply?
I have seen other posts in your forums on this BUT in them I have not seen clear advice from you.
Can I ask two things please.
Support - I keep finding a lot of your links are broken. Where is https://github.com/aspnetzero/aspnet-zero-core/issues/2538#issuecomment-518217281?
We have the same problem here. So I have applied the same solution. ie
.SetIsOriginAllowed((host)=> true)
For now.
Seems to be no better solution described here.
Ps. I am not the only one having difficulty working out where/how to do it. See https://stackoverflow.com/questions/48179508/change-default-culture-in-aspnetboilerplate
So for now I have just did what this fellow did and changed it directly in the database. But where/how do I do that in the code?
Im aware of this: await SettingManager.ChangeSettingForApplicationAsync(LocalizationSettingNames.DefaultLanguage, "en-AU");
But have no idea where to put it.