[GH-ISSUE #3132] [bug]: Login redirect to login page again #1031

Closed
opened 2026-03-16 18:12:21 +03:00 by kerem · 6 comments
Owner

Originally created by @talenta-eg on GitHub (Jun 11, 2023).
Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/3132

Is there an existing issue for this?

  • I have searched the existing issues

Current behavior

When i try to login via email or via github

Steps to reproduce

1 - Via email i can receive invitation mail , but when click on sign-in button i redirect to login page again

2 - Via Github i can redirect to Auth page and i cane gave the login permission , but also finally i redirect to login page again

i run this command for debug
pnpm exec prisma migrate deploy && pnpm run start:debug

debug result

ERROR [NestApplication] Error: listen EADDRINUSE: address already in use :::3000 +4ms

Environment

Production

Version

Self-hosted

Originally created by @talenta-eg on GitHub (Jun 11, 2023). Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/3132 ### Is there an existing issue for this? - [X] I have searched the existing issues ### Current behavior When i try to login via email or via github ### Steps to reproduce 1 - Via email i can receive invitation mail , but when click on sign-in button i redirect to login page again 2 - Via Github i can redirect to Auth page and i cane gave the login permission , but also finally i redirect to login page again i run this command for debug `pnpm exec prisma migrate deploy && pnpm run start:debug ` debug result `ERROR [NestApplication] Error: listen EADDRINUSE: address already in use :::3000 +4ms` ### Environment Production ### Version Self-hosted
kerem 2026-03-16 18:12:21 +03:00
Author
Owner

@balub commented on GitHub (Jun 19, 2023):

@talenta-eg Is your Hoppscotch instance running over HTTPS because we use HTTP, secure cookies so they may not get set in the browser over a normal HTTP connection.

<!-- gh-comment-id:1597194171 --> @balub commented on GitHub (Jun 19, 2023): @talenta-eg Is your Hoppscotch instance running over `HTTPS` because we use HTTP, secure cookies so they may not get set in the browser over a normal `HTTP` connection.
Author
Owner

@gdevelek commented on GitHub (Jul 7, 2023):

I'm running on plain HTTP and I have the same problem. I receive the magic link, I follow it, and I find myself connected as a guest again, with the purple button to login on the top right.

This is a blocking issue for us....

<!-- gh-comment-id:1625128272 --> @gdevelek commented on GitHub (Jul 7, 2023): I'm running on plain HTTP and I have the same problem. I receive the magic link, I follow it, and I find myself connected as a guest again, with the purple button to login on the top right. This is a blocking issue for us....
Author
Owner

@balub commented on GitHub (Jul 7, 2023):

@gdevelek We use HTTP secure cookies, what this means is if your domains are not secured over HTTPS the cookies will not be saved in your browser, that's most probably why the app shows you the login button even though you successfully authenticated yourself. Could you secure your domain and try again?

<!-- gh-comment-id:1625216982 --> @balub commented on GitHub (Jul 7, 2023): @gdevelek We use HTTP secure cookies, what this means is if your domains are not secured over HTTPS the cookies will not be saved in your browser, that's most probably why the app shows you the login button even though you successfully authenticated yourself. Could you secure your domain and try again?
Author
Owner

@gdevelek commented on GitHub (Jul 11, 2023):

@balub Thanks, we secured the site using a load balancer and now we face the issue with CORS. We have enabled 3 separate domain URLs in order to account for the 3 services, and have put them as WHITELISTED_ORIGINS, but still we get this:

Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://hoppscotch-gql.ourcompany.com/v1/auth/signin. (Reason: CORS header ‘Access-Control-Allow-Origin’ missing). Status code: 405.

Under packages/hoppscotch-backend/src we have changed main.ts to explicitly call

  app.enableCors({
    origin: [
      'https://hoppscotch.ourcompany.com',
      'https://hoppscotch-admin.ourcompany.com',
      'https://hoppscotch-gql.ourcompany.com'
    ],
    credentials: true,
  });

...inside the bootstrap function, but as we execute the Login button we don't see relevant logging in the browser console, it seems the bootstrap function is not called.

We are trying to evaluate Hoppscotch but little things like this are blocking us....

<!-- gh-comment-id:1630371920 --> @gdevelek commented on GitHub (Jul 11, 2023): @balub Thanks, we secured the site using a load balancer and now we face the issue with CORS. We have enabled 3 separate domain URLs in order to account for the 3 services, and have put them as WHITELISTED_ORIGINS, but still we get this: _Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://hoppscotch-gql.ourcompany.com/v1/auth/signin. (Reason: CORS header ‘Access-Control-Allow-Origin’ missing). Status code: 405._ Under packages/hoppscotch-backend/src we have changed main.ts to explicitly call ``` app.enableCors({ origin: [ 'https://hoppscotch.ourcompany.com', 'https://hoppscotch-admin.ourcompany.com', 'https://hoppscotch-gql.ourcompany.com' ], credentials: true, }); ``` ...inside the bootstrap function, but as we execute the Login button we don't see relevant logging in the browser console, it seems the bootstrap function is not called. We are trying to evaluate Hoppscotch but little things like this are blocking us....
Author
Owner

@dreamwhite commented on GitHub (Jul 20, 2023):

I'm running on plain HTTP and I have the same problem. I receive the magic link, I follow it, and I find myself connected as a guest again, with the purple button to login on the top right.

This is a blocking issue for us....

I'm experiencing the same issue. I can see that the DB is filled with my GH data, but at the same time, I still get a loop when trying to login...

<!-- gh-comment-id:1644789272 --> @dreamwhite commented on GitHub (Jul 20, 2023): > I'm running on plain HTTP and I have the same problem. I receive the magic link, I follow it, and I find myself connected as a guest again, with the purple button to login on the top right. > > This is a blocking issue for us.... I'm experiencing the same issue. I can see that the DB is filled with my GH data, but at the same time, I still get a loop when trying to login...
Author
Owner

@AndrewBastin commented on GitHub (Sep 6, 2023):

Closing this issue due to inactivity. Please do reopen this issue if it still persists in 2023.8.0.

<!-- gh-comment-id:1708699834 --> @AndrewBastin commented on GitHub (Sep 6, 2023): Closing this issue due to inactivity. Please do reopen this issue if it still persists in 2023.8.0.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/hoppscotch#1031
No description provided.