Login and registration with VSHN Account #5

Closed
opened 2025-03-04 09:21:58 +00:00 by tobru · 3 comments
Owner

Stories

As a user, I want to log in using my VSHN Account via OpenID Connect so that I can access the portal securely

As a user, I want to be automatically registered in the portal when I first log in with my VSHN Account so that I can start using the portal immediately

Implementation Notes

  • The VSHN Account is a Keycloak instance
  • The OpenID parameters need to be configurable so that they can differ depending on the application's environment
## Stories _As a user, I want to log in using my VSHN Account via OpenID Connect so that I can access the portal securely_ _As a user, I want to be automatically registered in the portal when I first log in with my VSHN Account so that I can start using the portal immediately_ ## Implementation Notes * The VSHN Account is a Keycloak instance * The OpenID parameters need to be configurable so that they can differ depending on the application's environment
tobru changed title from Login with VSHN Account to Login and registration with VSHN Account 2025-03-04 09:23:25 +00:00
Author
Owner

@tobru TODO: Figure out how to work in local dev env. Do we need a local Keycloak? Can we use the VSHN Test Keycloak?

@tobru TODO: Figure out how to work in local dev env. Do we need a local Keycloak? Can we use the VSHN Test Keycloak?
Author
Owner

Wo do work with the VSHN Test Keycloak for now, this is the intended allauth configuration:

SOCIALACCOUNT_AUTO_SIGNUP = True
SOCIALACCOUNT_ONLY = True
SOCIALACCOUNT_PROVIDERS = {
    "openid_connect": {
        "APPS": [
            {
                "provider_id": "keycloak",
                "name": "VSHN Account",
                "client_id": "HIDDEN",
                "secret": "HIDDEN",
                "settings": {
                    "server_url": "HIDDEN",
                },
            }
        ]
    }
}

For SOCIALACCOUNT_ONLY we probably still need to be able to log in to Django admin with a local account for now.

And for making the allauth themes look good, we could use https://github.com/harrelchris/django-allauth-themes (maybe just vendor the templates to not rely on the dependency)

Related docs:

Wo do work with the VSHN Test Keycloak for now, this is the intended allauth configuration: ``` SOCIALACCOUNT_AUTO_SIGNUP = True SOCIALACCOUNT_ONLY = True SOCIALACCOUNT_PROVIDERS = { "openid_connect": { "APPS": [ { "provider_id": "keycloak", "name": "VSHN Account", "client_id": "HIDDEN", "secret": "HIDDEN", "settings": { "server_url": "HIDDEN", }, } ] } } ``` For `SOCIALACCOUNT_ONLY` we probably still need to be able to log in to Django admin with a local account for now. And for making the allauth themes look good, we could use https://github.com/harrelchris/django-allauth-themes (maybe just vendor the templates to not rely on the dependency) Related docs: * https://docs.allauth.org/en/latest/socialaccount/introduction.html
Author
Owner

As discussed, we set SOCIALACCOUNT_ONLY = False for now as the Django admin also uses allauth.

As discussed, we set `SOCIALACCOUNT_ONLY = False` for now as the Django admin also uses allauth.
rixx closed this issue 2025-03-20 09:24:30 +00:00
Sign in to join this conversation.
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
servala/servala-portal#5
No description provided.