Skip to content

Commit

Permalink
fix: add OnRedirectToIdentityProvider
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeff-Tian committed Dec 1, 2023
1 parent d01a86f commit 1231918
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions hosts/main/HostingExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,11 @@ private static void AddExternalIdentityProviders(this WebApplicationBuilder buil
NameClaimType = "name",
RoleClaimType = "role"
};
options.Events.OnRedirectToIdentityProvider = ctx =>
{
ctx.ProtocolMessage.LoginHint = (string)ctx.Properties.Parameters["login_hint"];
return Task.CompletedTask;
};
});
}

Expand Down

0 comments on commit 1231918

Please sign in to comment.