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

Login through Gitlab returns 500 #1157

Closed
vimal7016 opened this issue Mar 18, 2021 · 1 comment
Closed

Login through Gitlab returns 500 #1157

vimal7016 opened this issue Mar 18, 2021 · 1 comment
Labels
bug Something is not working. good first issue A good issue to tackle when being a novice to the project. help wanted We are looking for help on this one.

Comments

@vimal7016
Copy link

Describe the bug

Login through Gitlab returns 500

Reproducing the bug

Steps to reproduce the behavior:

  1. Follow exactly same steps

Server logs

[
  {
    "code": 500,
    "status": "Internal Server Error",
    "reason": "Unable to initialize OpenID Connect Provider: Get \"/.well-known/openid-configuration\": unsupported protocol scheme \"\"",
    "message": "An internal server error occurred, please contact the system administrator"
  }
]

Server configuration

selfservice:
  default_browser_return_url: http://127.0.0.1:4455/
  whitelisted_return_urls:
    - http://127.0.0.1:4455

  methods:
    password:
      enabled: true
    
    oidc:
      enabled: true
      config:
        providers:
          - id: gitlab # this is `<provider-id>` in the Authorization callback URL. DO NOT CHANGE IT ONCE SET!
            provider: gitlab
            client_id: ... # Replace this with the OAuth2 Client ID provided by GitLab
            client_secret: ... # Replace this with the OAuth2 Client Secret provided by GitLab
            mapper_url: file:///etc/config/kratos/oidc.gitlab.jsonnet
            scope:
              - read_user
              - openid
              - profile
              - email

Environment

  • Version: v3.7 (quickstart.yml)
  • Environment: Docker
@zepatrik
Copy link
Member

As a hint for anyone working on this: I suspect the order of operations here:

o, err := g.OAuth2(ctx)
if err != nil {
return nil, errors.WithStack(herodot.ErrInternalServerError.WithReasonf("%s", err))
}
client := o.Client(ctx, exchange)
u, err := g.endpoint()

@zepatrik zepatrik added bug Something is not working. good first issue A good issue to tackle when being a novice to the project. help wanted We are looking for help on this one. labels Mar 18, 2021
@Benehiko Benehiko mentioned this issue Mar 18, 2021
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something is not working. good first issue A good issue to tackle when being a novice to the project. help wanted We are looking for help on this one.
Projects
None yet
Development

No branches or pull requests

2 participants