mod_http_oauth2: Fix table index error when using refresh token
authorKim Alvefur <zash@zash.se>
Wed, 12 Apr 2023 11:22:36 +0200
changeset 5344 cd195283127f
parent 5343 6d99ddd99694
child 5345 dcb93ffe64ae
mod_http_oauth2: Fix table index error when using refresh token
mod_http_oauth2/mod_http_oauth2.lua
--- a/mod_http_oauth2/mod_http_oauth2.lua	Tue Apr 11 15:59:35 2023 +0200
+++ b/mod_http_oauth2/mod_http_oauth2.lua	Wed Apr 12 11:22:36 2023 +0200
@@ -366,7 +366,7 @@
 	refresh_token_info.token = params.refresh_token;
 
 	return json.encode(new_access_token(
-		refresh_token_info.jid, refresh_token_info.role, refresh_token_info.data.oauth2_scopes, client, nil, refresh_token_info
+		refresh_token_info.jid, refresh_token_info.role, refresh_token_info.grant.data.oauth2_scopes, client, nil, refresh_token_info
 	));
 end