# HG changeset patch # User Kim Alvefur # Date 1701612470 -3600 # Node ID 87920d436cb44ebdf216ac3263ab9c77af21431f # Parent 6c0570a8b86606068f812e85312180557572f051 mod_http_oauth2: Handle login_hint without @hostpart Makes life easier for the client when it does not know the full JID, which might not have the same hostpart as the authorization server URL. diff -r 6c0570a8b866 -r 87920d436cb4 mod_http_oauth2/mod_http_oauth2.lua --- a/mod_http_oauth2/mod_http_oauth2.lua Sat Dec 02 13:35:29 2023 +0100 +++ b/mod_http_oauth2/mod_http_oauth2.lua Sun Dec 03 15:07:50 2023 +0100 @@ -895,7 +895,7 @@ -- Render login page local extra = {}; if params.login_hint then - extra.username_hint = (jid.prepped_split(params.login_hint)); + extra.username_hint = (jid.prepped_split(params.login_hint) or encodings.stringprep.nodeprep(params.login_hint)); elseif not prompt:contains("select_account") then -- TODO If the login page is split into account selection followed by login -- (e.g. password), and then the account selection could be skipped iff the