Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GQL Error: Sign In always comes up once logged out and when we try to login again #2944

Open
JayasreeReddy20 opened this issue Sep 27, 2024 · 4 comments
Labels

Comments

@JayasreeReddy20
Copy link

I have setup the oauth2-proxy logout url oauth2/sign_out which works perfectly fine and it expires the current session. But, when I try to sign-in using a new tab or window, it takes me to this error GQL Error: Sign In again and again till I clear my browser history to login again.

image

My cloudbeaver server configuration has "expireSessionAfterPeriod": 1800000, which is ~30min and I see the default configuration of oauth2-proy as follows,
reference url https://github.com/oauth2-proxy/oauth2-proxy/blob/master/contrib/oauth2-proxy.cfg.example
cookie_name = "_oauth2_proxy", cookie_expire = "168h"

Is there something that I'm missing or need to changes the expiry time?
I feel that, once I logout it has to give a proper logout message like "you are logged out or something" and has to take me to new sign in once I initiate a new login.

I have went through the similar issue raised earlier #2248 but felt like still need some help :)

@JayasreeReddy20 JayasreeReddy20 added question Further information is requested wait for review labels Sep 27, 2024
@EvgeniaBzzz
Copy link
Contributor

Hi @JayasreeReddy20
You need to change your proxy settings - add redirect to login page if user is not authorized.
Also, it looks like the cookies on your side are not cleared.
This issue can be helpful.

@EvgeniaBzzz
Copy link
Contributor

Hi @JayasreeReddy20
Any news here?

@JayasreeReddy20
Copy link
Author

Hello @EvgeniaBzzz ,

Yeah, I have added the logout url in my cloudbeaver.conf file as below
"logout-url": "https://internalapp.yourcompany.com/oauth2/sign_out?rd=%2Fcloudbeaver"

This will logout from cloudbeaver and opens a new window to redirect to login again which is what we want to achieve.
But, the existing window in which the logout happens remain there without closing and when I refresh it, it gives me the above error page as attached at starting of the conversation if I don't sign-in in the newly opened window.

If I sign-in into the new window and as the existing window isn't closed yet, if I refresh it, it loads.

Now, all I wanted to achieve is, when redirect is happening and opening a new window to login again, my existing window should close or shouldn't work at all after I start to login into the new window.

Is this an expected behavior or am I missing anything? Please suggest

@EvgeniaBzzz
Copy link
Contributor

Hi @JayasreeReddy20
Please check your proxy settings. Proxy should redirect to auth page if user is not logged in. But now it redirects to auth page on any request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants