From d01a86f581a4235208a4499767b2179782665a11 Mon Sep 17 00:00:00 2001 From: Jeff Tian Date: Fri, 1 Dec 2023 10:55:38 +0800 Subject: [PATCH] fix: use parameters for login_hint --- hosts/main/Pages/ExternalLogin/Challenge.cshtml.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/hosts/main/Pages/ExternalLogin/Challenge.cshtml.cs b/hosts/main/Pages/ExternalLogin/Challenge.cshtml.cs index 5103a0647..81170f670 100644 --- a/hosts/main/Pages/ExternalLogin/Challenge.cshtml.cs +++ b/hosts/main/Pages/ExternalLogin/Challenge.cshtml.cs @@ -38,8 +38,11 @@ public IActionResult OnGet(string scheme, string returnUrl) { { "returnUrl", returnUrl }, { "scheme", scheme }, - { "login_hint", "jeff.tian@outlook.com" }, - { "loginHint", "jeff.tian@outlook.com" } + }, + + // The authentication properties supports to collections, Items and Parameters. The difference is that the Parameters is only available during challenge, while the Items are saved and available both during challenge and when the response is handled. Since the login_hint is set on challenge, it is suggested that the Parameters collection is used for it: + Parameters = { + { "login_hint", "jeff.tian@outlook.com" } } };