Appearance
PayPal authentication
PayPal authentication lets your users sign in with their PayPal account. Once connected, you can offer “Continue with PayPal” in your WeWeb app.
What this integration supports
- Social sign in with PayPal (Log in with PayPal)
- Redirect to different pages for success, error, and first-time users
Setup in the PayPal Developer Dashboard
You create an app in PayPal and register WeWeb’s return URL (the URL PayPal sends users back to after they approve sign in).
1. Create an app and get credentials
- Open the PayPal Developer Dashboard.
- Go to
Apps & Credentials. - Create an app (you can create one in
Sandboxfor testing, and one inLivefor production). - Copy:
Client IDClient Secret
2. Enable “Log in with PayPal” and set the return URL
- In your app, find
Other features. - Enable
Log in with PayPal, then openAdvanced Settings. - Set the
Return URLto:https://<your-domain>/api/auth/callback/paypal
- Choose which user information you want to request (start with the minimum you need).
- Add your
Privacy policy URLandUser agreement URL(PayPal allowshttps://example.comfor testing). - Save your changes.
If you use multiple environments, add a return URL for each environment (preview, staging, production).
IMPORTANT
PayPal sign in is easier to test on a real public domain. Localhost setups can be blocked depending on your PayPal configuration.
Connect PayPal in WeWeb
- In the WeWeb editor, go to
Data & API → Auth → Integrating providers. - Find
PayPaland expand it. - Turn on the
Enabletoggle. - Paste:
Client IDClient Secret
- Click
Save.
WeWeb stores these values as environment variables (for example PROVIDER_PAYPAL_CLIENT_ID and PROVIDER_PAYPAL_CLIENT_SECRET).
Test sign in
- In
Interface, add a “Continue with PayPal” button. - Create a workflow on click and add
Sign in with social provider. - Set:
Provider:paypalSuccess page,Error page, And (optional)New user page
- Preview your project and complete the PayPal sign-in flow.
For what to do after sign in (roles, private pages, and access checks), see Users and roles overview →.
Common pitfalls
Return URL mismatch
If PayPal shows an error about the return URL, the return URL in PayPal doesn’t match what your app is using.
- In PayPal, confirm
Other features→Log in with PayPal→Advanced Settingsincludeshttps://./api/auth/callback/paypal - Make sure you are testing on the same domain you registered (preview vs production).
Using sandbox credentials in production (or the other way around)
PayPal has separate credentials for sandbox and live.
- Use sandbox
Client ID/Client Secretin your staging environment while testing. - Use live
Client ID/Client Secretin your production environment when you go live.
App review delays (live)
Live “Log in with PayPal” apps can require review before they work for real users.
- Plan extra time for PayPal review for live apps.
- Make sure your privacy policy and user agreement URLs are real before going live.
Reference
WeWeb settings
| Setting in WeWeb | Description | Where to find it in PayPal |
|---|---|---|
Client ID | Identifies your PayPal app. | PayPal Developer Dashboard → Apps & Credentials. |
Client Secret | Secret used to securely complete sign in. | PayPal Developer Dashboard → Apps & Credentials. |
FAQs
Which return URL should I set in PayPal?
Set your return URL to https://<your-domain>/api/auth/callback/paypal. Add one return URL per environment you use.
What provider value should I use in the workflow action?
Use paypal as the Provider value in the Sign in with social provider action.
Continue learning
Next, learn how to protect pages and data once users are signed in.

