hi
If you set 2FA to Forced
, The system will assume all users have 2FA enabled, but they need to configure at least one valid 2FA provider. eg: email. SMS, authenticator.
hi
You can override the UnitOfWorkMongoDbContextProvider's CreateMongoClient
method to change the code of creating MongoClient
.
Add YourUnitOfWorkMongoDbContextProvider : UnitOfWorkMongoDbContextProvider
Then replace it in DI.
context.Services.TryAddTransient(
typeof(IMongoDbContextProvider<>),
typeof(UnitOfWorkMongoDbContextProvider<>)
);
https://github.com/abpframework/abp/blob/dev/framework/src/Volo.Abp.MongoDB/Volo/Abp/Uow/MongoDB/UnitOfWorkMongoDbContextProvider.cs#L300-L306
var connectionString = "mongodb+srv://ibl-mongo.dizxt.mongodb.net/tri-app-db?retryWrites=true&w=majority&appName=ibl-mongo&tls=true&authMechanism=MONGODB-X509&authSource=%24external";
var settings = MongoClientSettings.FromConnectionString(connectionString);
settings.ServerApi = new ServerApi(ServerApiVersion.V1);
var cert = new X509Certificate2("C:\\projects\\development\\IBL\\Trabsitaly\\TransitalyApp\\src\\TransitalyApp.HttpApi.Host\\atlas-user-cert.pfx", "changeit");
settings.SslSettings = new SslSettings
{
ClientCertificates = new List<X509Certificate>() { cert }
};
var client = new MongoClient(settings);
hi
I will hide the 2FA menu from user dropbox if the current behavior is Forced
,
or show the message details: It's not allowed to change two factor setting.
Thanks.
hi
Can you connect your MongoDB in another app/code?
Do you have any example code of authMechanism=MONGODB-X509
?
Thanks.
hi
You can refer to :
https://github.com/abpframework/abp/pull/10152#issue-1007619207 https://abp.io/community/articles/switching-between-organization-units-i5tokpzt
hi
Can you share the logs.txt of the backend app?
Thanks
liming.ma@volosoft.com
hi
You should add it to your project that contains the OpenIddict/Account module. eg xxx.AuthServer
project
hi alirizaadiyahsi
You can test this:
https://abp.io/support/questions/8068/Suspicious-updates-on-OpenIddictApplication-when-token-endpoint-is-called-with-clientcredentials-granttype#answer-3a158dd3-918a-fd76-1e37-5cfe204100e5