Skip to content

Commit

Permalink
fix: paypal tokens request requires encoded redirect_uri
Browse files Browse the repository at this point in the history
* fix: encode paypal `redirect_uri`

* chore: add comment
  • Loading branch information
Yizack authored Sep 6, 2024
1 parent 6b5f5eb commit 8bf3b0b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/runtime/server/lib/oauth/paypal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ export function oauthPaypalEventHandler({ config, onSuccess, onError }: OAuthCon
},
params: {
grant_type: 'authorization_code',
redirect_uri: redirectURL,
redirect_uri: encodeURIComponent(redirectURL), // <- PayPal requires to be URL encoded
code: query.code,
},
})
Expand Down

0 comments on commit 8bf3b0b

Please sign in to comment.