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

With a self-hosted oidc server, no error logs are reported and the browser returns status code 404 #1074

Closed
vitaaaaa1 opened this issue Sep 29, 2024 · 9 comments

Comments

@vitaaaaa1
Copy link

hello everyone,I tried to configure oidc.However, after I clicked on oidc to log in, the browser and the program log did not respond,The status code of the browser console,

https://warpgate.com:8888/@warpgate/api/sso/providers/oidc-custom/start
# 500 Internal Server Error
https://warpgate.com:8888/@warpgate/api/auth/state
# 404 Not Found

Other than that there are no error messages
My oidc provider is Authentik
And this is my is my program configuration file

- name: oidc-custom
  label: Custom SSO
  provider:
    type: custom
    client_id: xxx
    client_secret: xxxx
    issuer_url: https://authentik.xxx.com/application/o/warpgate/.well-known/openid-configuration
    scopes:
      - email
      - openid

These are my oidc provider information

OpenID Configuration URL 
https://authentik.xxx.com/application/o/warpgate/.well-known/openid-configuration
OpenID Configuration Issuer
https://authentik.xxx.com/application/o/warpgate/
Authorize URL
https://authentik.xxx.com/application/o/authorize/
Redirect URIs
https://warpgate.com:8888/@warpgate/api/sso/return

Someone can help me

@Eugeny
Copy link
Member

Eugeny commented Sep 29, 2024

Try using the URL without the /.well-known/openid-configuration suffix and if that doesn't help, run Warpgate with --debug and grab the output when trying to log in.

@vitaaaaa1
Copy link
Author

--debug
I'm using docker compose to start my application, where should I add the debug parameter

version: '3'
services:
  warpgate:
    image: ghcr.io/warp-tech/warpgate
    ports:
      - 2222:2222
      - 8888:8888
      - 33306:33306
    volumes:
      - ./data:/data
    stdin_open: true
    tty: true

@Eugeny
Copy link
Member

Eugeny commented Sep 29, 2024

Add the command like this:

version: '3'
services:
  warpgate:
    image: ghcr.io/warp-tech/warpgate
    ports:
      - 2222:2222
      - 8888:8888
      - 33306:33306
    volumes:
      - ./data:/data
    stdin_open: true
    tty: true
    command: ['--debug', 'run']

@vitaaaaa1
Copy link
Author

Other programs to configure the oidc will require more parameters than issuer_url
Like other parameters, like
token_url
userdata_url
oauth_callback_url
Am I missing any parameters, but I don't see any other parameters that need to be configured on the official website

@Eugeny
Copy link
Member

Eugeny commented Sep 30, 2024

Surely you're getting some output?

Screenshot 2024-09-30 at 12 22 04

@Eugeny
Copy link
Member

Eugeny commented Sep 30, 2024

Now try doing an OIDC login and see what gets logged

@cosmoswafer
Copy link

I have a similar issue with version 0.11.0. When I visit /@warpgate/api/sso/providers/custom/start?next=%2F, I receive the following error messages. I have tried both with and without the trailing slash (/):

Provider discovery error: Validation error: unexpected issuer URI `https://example.site.com` (expected `https://example.site.com/`)

@Eugeny
Copy link
Member

Eugeny commented Oct 14, 2024

@cosmoswafer what's your SSO configuration like?

@cosmoswafer
Copy link

Here it is, I have tried both with and without the trailing slash (/)

sso_providers:
- name: custom
  label: NextCloud
  provider:
    type: custom
    client_id: xxxxxxxxxx
    client_secret: xxxxxxxxxx
    issuer_url: https://example.site.com/
    scopes: ["email"]

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

3 participants