1
0
Kevin Matsubara c3df56b0da Add identity context and ASP.NET individual account pages for authorization.
I created a new Blazor project with individual accounts, then transferred the files over to the existing project.
Then renamed ApplicationDbContext to: IdentityContext to distinguish from the application context.
Then ran the update database command with the existing migration for identity.
2025-04-18 10:20:55 +02:00

35 lines
1.0 KiB
Plaintext

@page "/Account/Manage/PersonalData"
@inject IdentityUserAccessor UserAccessor
<PageTitle>Personal Data</PageTitle>
<StatusMessage />
<h3>Personal Data</h3>
<div class="row">
<div class="col-md-6">
<p>Your account contains personal data that you have given us. This page allows you to download or delete that data.</p>
<p>
<strong>Deleting this data will permanently remove your account, and this cannot be recovered.</strong>
</p>
<form action="Account/Manage/DownloadPersonalData" method="post">
<AntiforgeryToken />
<button class="btn btn-primary" type="submit">Download</button>
</form>
<p>
<a href="Account/Manage/DeletePersonalData" class="btn btn-danger">Delete</a>
</p>
</div>
</div>
@code {
[CascadingParameter]
private HttpContext HttpContext { get; set; } = default!;
protected override async Task OnInitializedAsync()
{
_ = await UserAccessor.GetRequiredUserAsync(HttpContext);
}
}