+ Account merge
+ Merge two accounts
+
+ If one person holds two accounts, they can be merged into one. You prove both accounts with a fresh sign-in each, choose
+ which one stays, see what changes and confirm; nothing is named until both proofs exist, and the other account is only
+ ever the one Heimdall identified from your second sign-in.
+
+
+ @if (Model.ResultMessage is not null)
+ {
+ @Model.ResultMessage
+ }
+
+ @if (Model.ConfirmMessage is not null)
+ {
+ @Model.ConfirmMessage
+ }
+
+ @if (Model.Stage == Bifrost.Web.Pages.Membership.MergeAccountsModel.MergeStage.Prove)
+ {
+ Prove both accounts
+
+ Sign-ins are held in memory for a few minutes and then dropped. For each account, name a provider that account holds:
+ signing in through a provider it does not hold would make an unrelated account.
+
+
+ This account
+ @if (Model.SelfProved)
+ {
+ This account is proved.
+ }
+ else
+ {
+
+ @foreach (var provider in Model.LinkableProviders)
+ {
+
+ }
+
+ }
+
+ The other account
+ @if (Model.OtherProved)
+ {
+ The other account is proved.
+ }
+ else
+ {
+
+ @foreach (var provider in Model.LinkableProviders)
+ {
+
+ }
+
+ }
+ }
+ else
+ {
+ The two accounts
+
+ - This account: @Model.SelfName
+ - The other account: @Model.OtherName
+
+
+ @if (Model.Keep is null)
+ {
+ Choose the account that stays. The other one is folded into it.
+
+ }
+ else
+ {
+ Keep @Model.KeptName
+ @Model.FoldedName is folded into it.
+
+ @foreach (var line in Model.PreviewLines)
+ {
+ - @line
+ }
+
+ @foreach (var statement in Model.Statements)
+ {
+ @statement
+ }
+
+
+ Keep @Model.FoldedName instead
+
+
+ @if (Model.BlockWords.Count > 0)
+ {
+
+
+ @foreach (var words in Model.BlockWords)
+ {
+ - @words
+ }
+
+
+ }
+ else if (Model.Stage == Bifrost.Web.Pages.Membership.MergeAccountsModel.MergeStage.ProveRemaining)
+ {
+
+ @Model.FoldedName holds more logins. Sign in once more through each one, so Heimdall knows the whole account agrees.
+
+
+ @foreach (var provider in Model.ProvidersToProve)
+ {
+
+ }
+
+ }
+ else if (Model.Stage == Bifrost.Web.Pages.Membership.MergeAccountsModel.MergeStage.Confirm)
+ {
+
+ }
+ }
+ }
+
diff --git a/src/Bifrost.Web/Pages/Membership/MergeAccounts.cshtml.cs b/src/Bifrost.Web/Pages/Membership/MergeAccounts.cshtml.cs
new file mode 100644
index 0000000..06087ab
--- /dev/null
+++ b/src/Bifrost.Web/Pages/Membership/MergeAccounts.cshtml.cs
@@ -0,0 +1,261 @@
+using System.Security.Claims;
+using Bifrost.Web.Configuration;
+using Bifrost.Web.Data;
+using Bifrost.Web.Features.Heimdall;
+using Bifrost.Web.Features.Membership;
+using Bifrost.Web.Features.Shared;
+using Microsoft.AspNetCore.Authorization;
+using Microsoft.AspNetCore.Mvc;
+using Microsoft.AspNetCore.Mvc.Filters;
+using Microsoft.AspNetCore.Mvc.RazorPages;
+using Microsoft.EntityFrameworkCore;
+using Microsoft.Extensions.Options;
+
+namespace Bifrost.Web.Pages.Membership;
+
+///