question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Bug]: Wrong Redirect/Landing Page in combination with Authentik for SSO authentication

See original GitHub issue

Is there an existing issue for this?

  • I have searched the existing issues

OS/Web Information

  • Web Browser: Tested with Firefox 102.0.1 and Google Chrome 103.0.5060.114
  • Local OS: Arch Linux
  • Remote OS: Debian GNU/Linux 10 (buster) (LXC Container)
  • Remote Architecture: AMD64
  • code-server --version: 4.4.0 b088ec7adf9e17bc75215f79e21498eb40da03ed with Code 1.66.2

Steps to Reproduce

  1. Install code-server
  2. (Optional?) Disable Password authentication in code-server
  3. Setup Authentik (https://github.com/goauthentik/authentik)
  4. Setup an application + provider for code-server
  5. Assign the code-server application in Authentik to the Proxy outpost
  6. Configure Nginx to act as a reverse proxy for code-server and to use Authentik for authentication
  7. Navigate to your code-server instance in your browser

Expected

When you navigate to code.domain.tld you should get redirected to Authenik where you need to log in with your Authentik details. After that you should get redirected back to code.domain.tld.

Actual

When you navigate to https://code.domain.tld you get redirected to Authenik where you need to log in with your Authentik details. After that you get redirected back to https://code.domain.tld/_static/out/browser/serviceWorker.js. You then need to open https://code.domain.tld again and it all works fine. This is especially annoying if you also use the PWA (Google Chrome), where you then have to close and reopen the window.

Logs

No response

Screenshot/Video

No response

Does this issue happen in VS Code or GitHub Codespaces?

  • I cannot reproduce this in VS Code.
  • I cannot reproduce this in GitHub Codespaces.

Are you accessing code-server over HTTPS?

  • I am using HTTPS.

Notes

I do use the same configuration for other self hosted web services (rTorrent, Radarr, Sonarr, Lidarr, Prowlarr, PiHole), with only changes to the domain name. So I would assume that the Authenik configuration is correct. I have no clue if that issue is maybe on Authentiks side, that is possible too. Though it is weird that I end up on a site from code-server which actually exists. This makes me believe that this is a code-server issue?

If needed I can of course post my full nginx configurations.

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:12 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
marissa999commented, Sep 25, 2022

Hmm I do not think I had that issue 🤔 Without knowing much more I would just blame your nginx setup and recommend you to check the nginx logs 🤔 In my experience nginx throws a 500 most of the time bc it couldnt reach the destination that it should proxy.

1reaction
TerenceLiu98commented, Sep 25, 2022

@marissa999 I tried the combination of authentik (forward auth) and code-server (both of them are in docker with nginx for reverse proxy) however, once I add the authentik’s forward auth nginx setup, the code-server URL goes to 500 internal Server Error. I wonder if you have met this situation before 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

Introducing authentik - an SSO Provider focused on ease of ...
Authentik is an identity provider for Single-Sign-on (SSO) focused on ease of use. ... Edit: I've just noticed there was bug in the...
Read more >
SAML | authentik
Name Example Description Name Company SAML The name of the authentication source Slug company‑saml The slug used in URLs for the source
Read more >
[Support] IBRACORP - All images and files - Page 11
I am having an issue after authenticating with authelia for my app that says 403 forbidden. Also, if I try to go to...
Read more >
App infinitely redirecting after login - Auth0 Community
Answer: There could be a few different reasons why authentication is lost after refreshing a single page application. Common reasons are 1) ...
Read more >
zWN - River Thames Conditions
Borrowing across zero error, T even phages include, Cbc news winnipeg traffic, ... Candy store window display design, Zhuolin jiang homepage, Istanbul bursa ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found