Q1: What are the existing interface for MongoDB that is equivalent to IPermissionManagementDbContext, ISettingManagementDbContext, etc.. that inherits IAbpMongoDbContext?
You need to use the relevant nuget package. For permission management It is Volo.Abp.PermissionManagement.MongoDB instead of Volo.Abp.PermissionManagement.EntityFrameworkCore. Same goes for all the modules.
Q2: The model builder configuration here are from Volo.Abp.*.EntityFrameworkCore namespace, are there also ones equivalent for MongoDB?
Yes, there are. You need to use the correct NuGet package as I have mentioned above.
IdentityService.MongoDB.csproj should contain packages as below:
<ItemGroup>
<PackageReference Include="Volo.Abp.MongoDB" Version="5.3.0" />
<PackageReference Include="Volo.Abp.Identity.Pro.MongoDB" Version="5.3.0" />
<PackageReference Include="Volo.Abp.IdentityServer.MongoDB" Version="5.3.0" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\MyFoodStore.IdentityService.Domain\MyFoodStore.IdentityService.Domain.csproj" />
</ItemGroup>
IdentityServiceDbContext should look like:
[ConnectionStringName(IdentityServiceDbProperties.ConnectionStringName)]
public class IdentityServiceDbContext: AbpMongoDbContext, IIdentityProMongoDbContext, IAbpIdentityServerMongoDbContext
{
public IMongoCollection<IdentityUser> Users { get; set; }
public IMongoCollection<IdentityRole> Roles { get; set; }
public IMongoCollection<IdentityClaimType> ClaimTypes { get; set; }
public IMongoCollection<OrganizationUnit> OrganizationUnits { get; set; }
public IMongoCollection<IdentitySecurityLog> SecurityLogs { get; set; }
public IMongoCollection<IdentityLinkUser> LinkUsers { get; set; }
public IMongoCollection<ApiResource> ApiResources { get; set; }
public IMongoCollection<ApiScope> ApiScopes { get; set; }
public IMongoCollection<Client> Clients { get; set; }
public IMongoCollection<IdentityResource> IdentityResources { get; set; }
public IMongoCollection<PersistedGrant> PersistedGrants { get; set; }
public IMongoCollection<DeviceFlowCodes> DeviceFlowCodes { get; set; }
protected override void CreateModel(IMongoModelBuilder modelBuilder)
{
base.CreateModel(modelBuilder);
modelBuilder.ConfigureIdentityPro();
modelBuilder.ConfigureIdentityServer();
}
}
You need to use the correct packages.
You need to override Account/ResetPasswordConfirmation page and remove the button and add a new one (or remove /signin-oidc path) to redirect to application for users to manually start the login again.
To override, create ResetPasswordConfirmation page under Account folder.
This is the current state of the page:
ResetPasswordConfirmation.cshtml:
@page
@model Volo.Abp.Account.Public.Web.Pages.Account.ResetPasswordConfirmationModel
@inject Volo.Abp.AspNetCore.Mvc.UI.Layout.IPageLayout PageLayout
@using Microsoft.AspNetCore.Mvc.Localization
@using Volo.Abp.Account.Localization
@inject IHtmlLocalizer<AccountResource> L
@{
PageLayout.Content.Title = L["ResetPassword"].Value;
}
<p>@L["YourPasswordIsSuccessfullyReset"]</p>
<a abp-button="Primary" asp-page="./Login" asp-route-returnUrl="@Model.ReturnUrl">@L["LoginToTheApplication"]</a>
ResetPasswordConfirmation.cshtml.cs:
namespace Volo.Abp.Account.Public.Web.Pages.Account;
[AllowAnonymous]
public class ResetPasswordConfirmationModel : AccountPageModel
{
[BindProperty(SupportsGet = true)]
public string ReturnUrl { get; set; }
[BindProperty(SupportsGet = true)]
public string ReturnUrlHash { get; set; }
public virtual Task<IActionResult> OnGetAsync()
{
ReturnUrl = GetRedirectUrl(ReturnUrl, ReturnUrlHash);
return Task.FromResult<IActionResult>(Page());
}
}
We watched the video, I think the main difference in our case is that we are using a standalone Angular app with Office-JS so it's not build inside ABP like your test project.
So, your angular application is not ABP, that's why you couldn't update to 5.3 also. Do I understand correctly?
We are aware of the issue and trying to fix the problem.
Thanks for your patience.
Actually, It is pretty much the same.
Follow the guide and replace the EntityFramework layer with MongoDB in AdministrationService.
At the end, AdministrationServiceDbContext must be implementing IAbpMongoDbContext
.
For DbMigrations, navigate to MyCompanyName.Shared.Hosting.Microservices project references and uncomment the Volo.Abp.MongoDB reference:
<!-- Un-comment if you are using mongodb in any microservice -->
<!-- <ProjectReference Include="..\..\..\..\..\..\abp\framework\src\Volo.Abp.MongoDB\Volo.Abp.MongoDB.csproj" />-->
Navigate to MongoDB folder and to PendingMongoDbMigrationsChecker.cs file and uncomment the public abstract class PendingMongoDbMigrationsChecker<TDbContext>
class.
Navigate to AdministrationServiceDatabaseMigrationChecker and update it to extend PendingMongoDbMigrationsChecker instead of PendingEfCoreMigrationsChecker
.
The same goes for all the microservices.
The default login flow as below is where you are redirected to authentication server (identityserver) with parameters and redirected back after your login request is verified.
In your case the login flow is interrupted with the password-reset flow:
Since the password reset link is sent, it becomes completely asynchronous and the flow is tries to be linked with login again with Go to the application step (between 6 and 7). However, the login related parameters are lost.
There are some best practice considerations in this scenario like invalidating the password reset link and rebuilding the login url etc.
If this is an urgent issue for your, you can override the Account/ResetPasswordConfirmation page and remove (or update) the Go to the application button
to trigger the login flow from the start again.
I have created an internal issue for this scenario and refunded your credit.
Thank you.
I think there is a mistake with your version, the microservice template became available after 4.4.
For deployment, we have added Dockerfiles for both local and in-container image building with scripts. There are also helm charts for Kubernetes.
We are still working on a step-by-step deployment guide however it will take some more time.
For docker deployment, you can check the sample project: eShopOnAbp.
If you come across any specific problem, you can search the Q&A or ask directly. We'll try to help as best as we can.
I am guessing you are not using refresh tokens.
Share your oAuthConfiguration in the envorinment.ts file, please.
Can you try it in incognito mode? Also, can you share your domain names?
The culture (with /
path) can be already set by other domain before you navigate to sub-domain.
Well, you just run abp install-libs
once and it will be generated already. It should run before your build process.
If you are using the Github repository as the application source to build, you can run abp install-libs
locally and commit to the Github repository.