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

[BUG] Unable to log in with OIDC. Redirects back to login page. #2519

Open
1 task
Sgt-Ogre opened this issue May 24, 2024 · 3 comments
Open
1 task

[BUG] Unable to log in with OIDC. Redirects back to login page. #2519

Sgt-Ogre opened this issue May 24, 2024 · 3 comments

Comments

@Sgt-Ogre
Copy link

If you have problems with the installation please use our community forum

What set up are you using

  • Cloud Hosted Version
  • [ x ] Self Hosted

Describe the bug
When attempting to log in with OIDC user after initial setup i get redirected to the login screen after IDP login. The user gets created but i am unable to log in with that user.

To Reproduce
Steps to reproduce the behavior:

  1. Setup OIDC configuration
  2. Log in using the OIDC Login button
  3. After login you will be redirected to login page
  4. User gets created and can be seen on the admin side.

Expected behavior
User is forwarded to dashboard

Leantime Version
Latest Docker image pulled last night

Server
NGINX reverse Proxy

PHP / MySQL Version
mysql docker 8.0

Additional context
Using authentik as the IDP

@samuk
Copy link

samuk commented Jun 5, 2024

I'm also having a similar issue getting Keycloak OIDC to work

@sy-gpe
Copy link
Contributor

sy-gpe commented Jun 12, 2024

Hello !

I think I've found out why this is happening. The SID cookie is now set with the SameSite restriction as Strict, which prevents the web browser from sending it when you're hitting the callback URL.

According to my tests, changing this restriction to Lax seems to fix the issue.

You can change this line on Leantime v3.1.4 to patch this issue :

->withSameSite('Lax')

@marcelfolaron Would your PR also fix this issue ? Or should I create a new one ?

Best regards

@marcelfolaron
Copy link
Contributor

Hey, yes the latest PR changes this back to Lax

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

No branches or pull requests

4 participants