EddieHubCommunity / RepoRater

Rate GitHub Repos for Developer Experience (DX)
https://repo-rater.eddiehub.org
MIT License
149 stars 37 forks source link

[BUG] Redirect User when user is not logged in #99

Closed Vijaykv5 closed 8 months ago

Vijaykv5 commented 8 months ago

Has this bug been raised before?

Where did you find this bug?

local

Description

When user is not logged in, They must not be redirected to the login page

Steps to Reproduce

  1. not logged in (guest)
  2. visit protected page
  3. redirect to login page

Screenshots

No response

Do you want to work on this issue?

Yes

If "yes" to above, please explain how you would technically implement this

  1. src/app/api/rate/route.js on line 25
  2. replace with return redirect("/?alert=error&message=Invalid Session");
- return redirect("/auth/login");
+ return redirect("/?alert=error&message=Invalid Session");
  1. also search the code for return redirect("/auth/login"); and replace with return redirect("/?alert=error&message=Invalid Session");
Vijaykv5 commented 8 months ago

Thank you @eddiejaoude :)