Add native Bifrost identity registration

This commit is contained in:
Meta Vens 2026-06-22 15:07:22 +01:00
commit 23c02be2a6
17 changed files with 366 additions and 29 deletions

View file

@ -10,6 +10,7 @@ namespace Bifrost.Web.Features.Membership;
public sealed class MembershipSynchronizationService(
BifrostDbContext dbContext,
BifrostIdentityService bifrostIdentityService,
IOptions<BootstrapOptions> bootstrapOptions,
TimeProvider timeProvider)
{
@ -97,6 +98,11 @@ public sealed class MembershipSynchronizationService(
userAccount.MemberProfile.Nickname = userAccount.DisplayName;
}
await bifrostIdentityService.EnsureIdentityAsync(
userAccount,
userAccount.GitHubLogin,
cancellationToken);
if (invitation is not null && invitation.AcceptedByUserAccountId is null)
{
invitation.AcceptedByUserAccountId = userAccount.Id;