Skip to content

Google OAuth callback URL hardcoded to production #3910

@Nixxx19

Description

@Nixxx19

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

  1. Run the app locally and start Google OAuth sign-in.
  2. After authenticating with Google, observe redirect to https://editor.p5js.org/auth/google/callback instead of localhost.
  3. Result: cannot complete sign-in in local/staging.

Snippet:

// passport.js - GoogleStrategy
callbackURL: 'https://editor.p5js.org/auth/google/callback',

Metadata

Metadata

Assignees

Labels

BugError or unexpected behaviors

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions