-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Open
Labels
BugError or unexpected behaviorsError or unexpected behaviors
Description
p5.js version
No response
What is your operating system?
None
Web browser and version
No response
Actual Behavior
Google strategy uses a hardcoded callback URL https://editor.p5js.org/auth/google/callback. In development or staging, after Google sign-in the user is redirected to production, breaking the flow and making local/staging Google OAuth testing impossible.
Location: server/config/passport.js line 237
Expected Behavior
Callback URL should be derived from configuration (e.g. EDITOR_URL or similar) so each environment uses its own URL (e.g. http://localhost:3000/auth/google/callback in dev).
Steps to reproduce
- Run the app locally and start Google OAuth sign-in.
- After authenticating with Google, observe redirect to
https://editor.p5js.org/auth/google/callbackinstead of localhost. - Result: cannot complete sign-in in local/staging.
Snippet:
// passport.js - GoogleStrategy
callbackURL: 'https://editor.p5js.org/auth/google/callback',Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
BugError or unexpected behaviorsError or unexpected behaviors