--- 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);