Skip to content

Commit 8bf3b0b

Browse files
authored
fix: paypal tokens request requires encoded redirect_uri
* fix: encode paypal `redirect_uri` * chore: add comment
1 parent 6b5f5eb commit 8bf3b0b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/runtime/server/lib/oauth/paypal.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ export function oauthPaypalEventHandler({ config, onSuccess, onError }: OAuthCon
117117
},
118118
params: {
119119
grant_type: 'authorization_code',
120-
redirect_uri: redirectURL,
120+
redirect_uri: encodeURIComponent(redirectURL), // <- PayPal requires to be URL encoded
121121
code: query.code,
122122
},
123123
})

0 commit comments

Comments
 (0)