codimd icon indicating copy to clipboard operation
codimd copied to clipboard

Github OAuth on CodiMD login gives 401 after logging in

Open sumrdev opened this issue 10 months ago • 1 comments

https://github.com/user-attachments/assets/05ab275a-d7b3-4738-a3d6-6a2576bd8282

this video probably shows everything easiest.

After setting up OAuth with GitHub I cannot login after successfully going through the login flow, i get 401.

sumrdev avatar Apr 03 '25 12:04 sumrdev

To add to this, it seems the redirect URL provided by CodiMD mistakenly starts query parameters with an ampersand (&) instead of a question mark (?), meaning the query parameters become part of the redirect URI and GitHub thus rejects it:

http://your_codi_instance/auth/github/callback&scope=read:user,read:org&client_id=your_client_id

In addition to this, the redirect URI provided by Codi is always http, with no obvious way to change it to https, making GitHub reject the URI

TheColorman avatar Apr 11 '25 09:04 TheColorman