Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: paypal tokens request requires encoded redirect_uri #157

Merged
merged 2 commits into from
Sep 6, 2024
Merged

fix: paypal tokens request requires encoded redirect_uri #157

merged 2 commits into from
Sep 6, 2024

Conversation

Yizack
Copy link
Contributor

@Yizack Yizack commented Sep 4, 2024

Hello! This PR re-adds the encodeURIComponent to the redirect_uri when fetching tokens.

I noticed the utils refactor in #147 broke PayPal login because the redirect_uri encode was removed, I should have left a comment in the code when I made the PayPal provider PR (#108) saying that at the moment PayPal login for some reason requires encoding the redirect_uri when fetching the tokens.

For testing:

  1. Login in sandbox mode https://developer.paypal.com/dashboard/applications/sandbox
  2. Go to REST API apps Click on Default Application
  3. Copy Client ID and Secret key 1
  4. Create a .env file and add the credentials respectively NUXT_OAUTH_PAYPAL_CLIENT_ID and NUXT_OAUTH_PAYPAL_CLIENT_SECRET
  5. Scroll down to the Features section, and enable Log in with PayPal
  6. Click on the Advanced Settings link below the Log in with PayPal checkbox
  7. Set Return URL to http://127.0.0.1:3000/auth/paypal
  8. Scroll down, select the scopes Full Name and Email
  9. Scroll down and enable Enable customers who have not yet confirmed their email with PayPal to log in to your app.
  10. Click on the Save button
  11. Go to https://developer.paypal.com/dashboard/accounts
  12. Create a new Personal or Business account (Create a new one, I don't recommend using the default ones)
  13. Click on the account name to see the credentials
  14. Test PayPal Login with the credentials

image

@Yizack Yizack changed the title fix: tokens request requires encoded paypal redirect_uri fix: paypal tokens request requires encoded redirect_uri Sep 4, 2024
@atinux atinux merged commit 8bf3b0b into atinux:main Sep 6, 2024
3 checks passed
@atinux
Copy link
Owner

atinux commented Sep 6, 2024

Thank you for the fix and sorry about this regression 😬 v0.3.7 is released.

(cc @Barbapapazes to be more careful about future refactors)

@Yizack Yizack deleted the fix/paypal-encode branch September 14, 2024 12:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants