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

OpenID broken #389

Open
jzbor opened this issue Jul 15, 2024 · 2 comments
Open

OpenID broken #389

jzbor opened this issue Jul 15, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@jzbor
Copy link

jzbor commented Jul 15, 2024

Which component is affected?

API

Did the issue occur at ClassQuiz.de, or on a self-hosted instance?

On a self-hosted instance

How can the issue be reproduced?

Try to set up OpenID login with an Obligator instance:

CUSTOM_OPENID_PROVIDER__CLIENT_ID=https://<your-instance>/
CUSTOM_OPENID_PROVIDER__CLIENT_SECRET=somerandomvaluenotrequiredbylastlogin
CUSTOM_OPENID_PROVIDER__SERVER_METADATA_URL=https://lastlogin.io/.well-known/openid-configuration

Describe the bug (with screenshots if possible)

I get the following response, when trying to log in:

{"detail":"Something went wrong."}

Device

Desktop

Operating System

Linux

Browser

Firefox

EDIT: For what it's worth Github does not work either...

@jzbor jzbor added the bug Something isn't working label Jul 15, 2024
@mawoka-myblock
Copy link
Owner

Please provide the output of docker compose logs --tail 200 api after trying to log in.

@jzbor
Copy link
Author

jzbor commented Jul 15, 2024

I believe this output contains secrets, so I have censored some values:

quiz-api  | Checking for script in /app/prestart.sh
quiz-api  | Running script /app/prestart.sh
quiz-api  | /usr/local/lib/python3.11/site-packages/cbor2/decoder.py:7: UserWarning: The cbor.decoder module has been deprecated. Instead import everything directly from cbor2.
quiz-api  |   warn("The cbor.decoder module has been deprecated. Instead import everything directly from cbor2.")
quiz-api  | INFO  [alembic.runtime.migration] Context impl PostgresqlImpl.
quiz-api  | INFO  [alembic.runtime.migration] Will assume transactional DDL.
quiz-api  | [2024-07-15 19:07:26 +0000] [1] [INFO] Starting gunicorn 21.2.0
quiz-api  | [2024-07-15 19:07:26 +0000] [1] [INFO] Listening at: http://0.0.0.0:80 (1)
quiz-api  | [2024-07-15 19:07:26 +0000] [1] [INFO] Using worker: uvicorn.workers.UvicornWorker
quiz-api  | [2024-07-15 19:07:26 +0000] [10] [INFO] Booting worker with pid: 10
quiz-api  | /usr/local/lib/python3.11/site-packages/cbor2/decoder.py:7: UserWarning: The cbor.decoder module has been deprecated. Instead import everything directly from cbor2.
quiz-api  |   warn("The cbor.decoder module has been deprecated. Instead import everything directly from cbor2.")
quiz-api  | [2024-07-15 19:07:27 +0000] [10] [INFO] Started server process [10]
quiz-api  | [2024-07-15 19:07:27 +0000] [10] [INFO] Waiting for application startup.
quiz-api  | [2024-07-15 19:07:29 +0000] [10] [INFO] Application startup complete.
quiz-api  | {"loglevel": "info", "workers": 1, "bind": "0.0.0.0:80", "graceful_timeout": 120, "timeout": 120, "keepalive": 5, "errorlog": "-", "accesslog": "-", "workers_per_core": 1.0, "use_max_workers": 1, "host": "0.0.0.0", "port": "80"}
quiz-api  | Creating MeiliSearch Index
quiz-api  | MeiliSearch and Database got out of sync, syncthing them
quiz-api  | Finished MeiliSearch synchronisation
quiz-api  | 172.18.0.9:50352 - "GET /api/v1/users/oauth/custom/login HTTP/1.1" 302
quiz-api  | 172.18.0.9:50352 - "GET /api/v1/users/oauth/custom/auth?client_id=https://quiz.jzbor.de/&redirect_uri=https://quiz.jzbor.de/api/v1/users/oauth/custom/auth&code=************&state=**********&scope=openid%20email%20profile HTTP/1.1" 401

EDIT:
These are the loglines for github:

quiz-api  | 172.18.0.9:52900 - "GET /api/v1/users/oauth/github/login HTTP/1.1" 302
quiz-api  | 172.18.0.9:52900 - "GET /api/v1/users/oauth/github/auth?code=***********&state=*********** HTTP/1.1" 307

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants