mod_http_oauth2/mod_http_oauth2.lua
changeset 5467 dacde53467f3
parent 5466 f6d8830a83fe
child 5469 66e13e79928b
--- a/mod_http_oauth2/mod_http_oauth2.lua	Wed May 17 16:34:19 2023 +0200
+++ b/mod_http_oauth2/mod_http_oauth2.lua	Wed May 17 16:40:07 2023 +0200
@@ -369,7 +369,7 @@
 	local token_info = new_access_token(granted_jid, granted_role, granted_scopes, client, nil);
 
 	local redirect = url.parse(get_redirect_uri(client, params.redirect_uri));
-	if not redirect then return 400; end
+	if not redirect then return oauth_error("invalid_redirect_uri"); end
 	token_info.state = params.state;
 	redirect.fragment = http.formencode(token_info);