devlarabar / 100freelancers

100freelancers is a tool to keep track of freelance clients. It is a community, open-source project in the early stages of development.
https://100freelancers.vercel.app
MIT License
15 stars 11 forks source link

Fixing the Passport Discord auth bug #3

Closed devlarabar closed 11 months ago

devlarabar commented 11 months ago

Expected Behavior

Upon clicking the "sign in" button and authorizing Discord, users should be successfully redirected to the /home page.

Current Behavior

Instead, after authorizing Discord, users are met with this:

Screenshot 2023-09-12 131832 Screenshot 2023-09-12 131839 (The link in the console goes here)

This goes away by manually navigating back to the root route using the URL bar (i.e. entering https://100freelancers.vercel.app/, which would then recognize that the user is logged in and redirect to the /home route).

I suspect the issue lies in the /client/app/home/page.jsx file, but am not entirely sure what it might be.

Steps to Reproduce

  1. Go to the demo and click the "sign in" button
  2. Authorize Discord

Context (Environment)

This bug only appears to be happening in production, not in local environments.