zitadel / example-python-django-oidc

Example Python Django OIDC Web
https://zitadel.com
Apache License 2.0
7 stars 1 forks source link

How do I trigger zitadel OIDC login? #6

Closed muhlemmer closed 9 months ago

muhlemmer commented 9 months ago

Following the README, I went to http://localhost:8000/admin/ but this renders a local login box, not zitadel's.

I have the following .env config:

ZITADEL_PROJECT = "248679332438897693" 
OIDC_RP_CLIENT_ID = "251128633756817393@dev"
OIDC_RP_CLIENT_SECRET = "nvBTGXJatUS4OKCoGVFyEhGp5vDe0WFbaqcv6YGmHKevlVZru3SnpXGgtiUMzj2o"
OIDC_RP_SIGN_ALGO = "RS256"

OIDC_OP_JWKS_ENDPOINT = "https://tims-zitadel-instance-oj7iry.zitadel.cloud/oauth/v2/keys"
OIDC_OP_AUTHORIZATION_ENDPOINT = "https://tims-zitadel-instance-oj7iry.zitadel.cloud/oauth/v2/authorize"
OIDC_OP_TOKEN_ENDPOINT = "https://tims-zitadel-instance-oj7iry.zitadel.cloud/oauth/v2/token"
OIDC_OP_USER_ENDPOINT = "https://tims-zitadel-instance-oj7iry.zitadel.cloud/oidc/v1/userinfo"

There are no errors in the log.

(BTW, I ran createsuperuser multiple times and none of the created accounts work for this box either, but that is not so important as we want a zitadel powered login.

The next option is http://localhost:8000/polls/, but this is a public page.

  1. Which URL do I need to go to to trigger the redirect to zitadel login?
  2. Superuser is something that could be used to recover access to a Django server, but is not relevant to zitadel. The app should work completely without the local superuser. Eg, an admin role in zitadel. See the PHP example
  3. The app root http://localhost:8000 renders a 404. Would be helpful to have an index page with some useful links to the parts of the app that will trigger login flows as required.
  4. Where is the user info supposed to be displayed? (See acceptance criteria)
stebenz commented 9 months ago

Created an index-page with the list of the different possible paths.