Open ID connect with GitLab

Dear Developers, I am newbie. Currently I am developing coder-server for the team. I refer to the coder-server setup from docker-compose at https://github.com/coder/coder/blob/main/docker-compose.yaml. https://docs.gitlab.com/ee/administration/auth/test_oidc_oauth.html#enable-oidcoauth-in-gitlab https://coder.com/docs/admin/auth I set the callback URL in GitLab App and the CODER_REDIRECTR_URI in Docker-compose to be the same "http://coder.aaa.bbb.ccc.com/" But when I select Open ID connect, I log in to Gitlab. There is a problem Regards, Ben.Ng
No description
Solution:
try changing your callback url to https://<coder domain>/api/v2/users/oidc/callback as per "Step 1: Set Redirect URI with your OIDC provider"
Jump to solution
13 Replies
Codercord
Codercord2mo ago
<#1271050743247536148>
Category
Feature request
Product
Coder OSS (v2)
Platform
Linux
Logs
Please post any relevant logs/error messages.
Atif
Atif2mo ago
Are you trying to have your developers login with GitLab using OIDC?
Ben.Ng
Ben.Ng2mo ago
Yes sir, but I have issue about URI
Phorcys
Phorcys2mo ago
could you send your full environment variables? redact them of course
Ben.Ng
Ben.Ng2mo ago
Dear @Phorcys , This is my setup in Application GitLab.
No description
Phorcys
Phorcys2mo ago
oh I meant Coder's environment variables but this is useful too!
Ben.Ng
Ben.Ng2mo ago
This is my setup in Docker compose (file .txt)
Phorcys
Phorcys2mo ago
i will take a look in a moment you can get rid of CODER_OIDC_REDIRECT_URI as it's not needed though i can't see anything wrong about your configuration alright i think i see the issue
Solution
Phorcys
Phorcys2mo ago
try changing your callback url to https://<coder domain>/api/v2/users/oidc/callback as per "Step 1: Set Redirect URI with your OIDC provider"
Ben.Ng
Ben.Ng2mo ago
Thank you sir. You are the best.
Phorcys
Phorcys2mo ago
great! can we close the issue then?
Ben.Ng
Ben.Ng2mo ago
Yes sir
Codercord
Codercord2mo ago
@Phorcys closed the thread.
Want results from more Discord servers?
Add your server