summaryrefslogtreecommitdiff
path: root/opendc-web
diff options
context:
space:
mode:
authorvincent van beek <vincent@vlogic.nl>2026-04-02 10:55:56 +0200
committerGitHub <noreply@github.com>2026-04-02 09:55:56 +0100
commit23d93ff366802bc5c6fe59109c8069f909f378f7 (patch)
tree720535abacb289096ce2fc127c56c4507987067c /opendc-web
parent07a2e0233a75e0cbc12c18b731d575a00a20aad2 (diff)
Fix authentication (#398)
* remove test flags for disabling authentication
Diffstat (limited to 'opendc-web')
-rw-r--r--opendc-web/opendc-web-server/src/main/resources/application-docker.properties21
-rw-r--r--opendc-web/opendc-web-server/src/main/webui/auth.js2
2 files changed, 10 insertions, 13 deletions
diff --git a/opendc-web/opendc-web-server/src/main/resources/application-docker.properties b/opendc-web/opendc-web-server/src/main/resources/application-docker.properties
index f0b3e7dc..f85e9185 100644
--- a/opendc-web/opendc-web-server/src/main/resources/application-docker.properties
+++ b/opendc-web/opendc-web-server/src/main/resources/application-docker.properties
@@ -30,23 +30,18 @@ quarkus.datasource.jdbc.url=${OPENDC_DB_URL}
quarkus.hibernate-orm.dialect=org.hibernate.dialect.PostgreSQLDialect
# Security
-opendc.security.enabled=true
-quarkus.oidc.auth-server-url=https://${OPENDC_AUTH0_DOMAIN}
-quarkus.oidc.client-id=${OPENDC_AUTH0_AUDIENCE}
-quarkus.oidc.token.audience=${quarkus.oidc.client-id}
+quarkus.oidc.auth-server-url=${OPENDC_AUTH0_DOMAIN}
+quarkus.oidc.application-type=service
+quarkus.oidc.client-id=${OPENDC_AUTH0_CLIENT_ID}
+quarkus.oidc.token.audience=${OPENDC_AUTH0_AUDIENCE}
quarkus.oidc.roles.role-claim-path=scope
# Swagger UI
-quarkus.swagger-ui.oauth-client-id=${OPENDC_AUTH0_DOCS_CLIENT_ID:}
-quarkus.swagger-ui.oauth-additional-query-string-params={"audience":"${OPENDC_AUTH0_AUDIENCE:https://api.opendc.org/v2/}"}
-
-quarkus.smallrye-openapi.security-scheme=oidc
-quarkus.smallrye-openapi.security-scheme-name=Auth0
-quarkus.smallrye-openapi.oidc-open-id-connect-url=https://${OPENDC_AUTH0_DOMAIN:opendc.eu.auth0.com}/.well-known/openid-configuration
-quarkus.smallrye-openapi.servers=https://api.opendc.org
+quarkus.swagger-ui.oauth-client-id=${OPENDC_AUTH0_CLIENT_ID}
+quarkus.swagger-ui.oauth-additional-query-string-params={"audience":"${OPENDC_AUTH0_AUDIENCE:https://opendc.org}"}
# Enable the settings below if you want to test the docker-compose deployment locally
#quarkus.hibernate-orm.database.generation=drop-and-create
-#quarkus.resteasy.path=/api
-#quarkus.oidc.enabled=false
+quarkus.resteasy.path=/api
+quarkus.oidc.enabled=true
#opendc.security.enabled=false
diff --git a/opendc-web/opendc-web-server/src/main/webui/auth.js b/opendc-web/opendc-web-server/src/main/webui/auth.js
index 8c88f526..89e8c0d7 100644
--- a/opendc-web/opendc-web-server/src/main/webui/auth.js
+++ b/opendc-web/opendc-web-server/src/main/webui/auth.js
@@ -83,6 +83,8 @@ export function AuthProvider({ children }) {
clientId={authConfig.clientId}
redirectUri={authConfig.redirectUri}
audience={authConfig.audience}
+ cacheLocation="localstorage"
+ useRefreshTokens={true}
>
{children}
</Auth0Provider>