Skip to content

Commit 1eaf79e

Browse files
authored
Fix registration (#1006)
* tentatively set redirect uri to be home for registration * seems to work now * use %20 to replace space * revert realm.json * fix deployment * revert clowder realm * revert
1 parent 3db8140 commit 1eaf79e

File tree

7 files changed

+14
-14
lines changed

7 files changed

+14
-14
lines changed

backend/app/config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ class Settings(BaseSettings):
4949
# scope=openid email&redirect_uri=http://<domain.com>/<redirect-path>&kc_locale=<two-digit-lang-code>
5050
auth_register_url = (
5151
f"{auth_base}/keycloak/realms/{auth_realm}/protocol/openid-connect/registrations?client_id"
52-
f"={auth_client_id}&response_type=code&redirect_uri={auth_redirect_uri}"
52+
f"={auth_client_id}&response_type=code"
5353
)
5454
auth_token_url = (
5555
f"{auth_base}/keycloak/realms/{auth_realm}/protocol/openid-connect/token"

deployments/kubernetes/charts/clowder2/templates/backend/deployment.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ spec:
7575
- name: oauth2_scheme_auth_url
7676
value: http://{{ include "clowder2.name" .}}-keycloak-headless:8080/keycloak/realms/clowder/protocol/openid-connect/auth?client_id=clowder2-backend&response_type=code
7777
- name: auth_register_url
78-
value: $(CLOWDER2_URL)/keycloak/realms/clowder/protocol/openid-connect/registrations?client_id=clowder2-backend&response_type=code&redirect_uri=$(auth_redirect_uri)
78+
value: $(CLOWDER2_URL)/keycloak/realms/clowder/protocol/openid-connect/registrations?client_id=clowder2-backend&response_type=code&redirect_uri=$(auth_redirect_uri)&scope=openid%20email
7979
- name: auth_token_url
8080
value: http://{{ include "clowder2.name" .}}-keycloak-headless:8080/keycloak/realms/clowder/protocol/openid-connect/token
8181
- name: auth_server_url

docker-compose.test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ services:
5454
auth_redirect_uri: http://localhost:80/api/v2/auth
5555
auth_url: http://localhost/keycloak/realms/clowder/protocol/openid-connect/auth?client_id=clowder2-backend&response_type=code
5656
oauth2_scheme_auth_url: http://keycloak:8080/keycloak/realms/clowder/protocol/openid-connect/auth?client_id=clowder2-backend&response_type=code
57-
auth_register_url: http://localhost/keycloak/realms/clowder/protocol/openid-connect/registrations?client_id=clowder2-backend&response_type=code
57+
auth_register_url: http://localhost/keycloak/realms/clowder/protocol/openid-connect/registrations?client_id=clowder2-backend&response_type=code&redirect_uri=http://localhost:80/api/v2/auth&scope=openid%20email
5858
auth_token_url: http://keycloak:8080/keycloak/realms/clowder/protocol/openid-connect/token
5959
auth_server_url: http://keycloak:8080/keycloak/
6060
keycloak_base: http://localhost/api

docker-compose.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ services:
5858
auth_redirect_uri: http://localhost:80/api/v2/auth
5959
auth_url: http://localhost/keycloak/realms/clowder/protocol/openid-connect/auth?client_id=clowder2-backend&response_type=code
6060
oauth2_scheme_auth_url: http://keycloak:8080/keycloak/realms/clowder/protocol/openid-connect/auth?client_id=clowder2-backend&response_type=code
61-
auth_register_url: http://localhost/keycloak/realms/clowder/protocol/openid-connect/registrations?client_id=clowder2-backend&response_type=code&redirect_uri=http://localhost:80/api/v2/auth
61+
auth_register_url: http://localhost/keycloak/realms/clowder/protocol/openid-connect/registrations?client_id=clowder2-backend&response_type=code&redirect_uri=http://localhost:80/api/v2/auth&scope=openid%20email
6262
auth_token_url: http://keycloak:8080/keycloak/realms/clowder/protocol/openid-connect/token
6363
auth_server_url: http://keycloak:8080/keycloak/
6464
keycloak_base: http://localhost/api
@@ -191,7 +191,7 @@ services:
191191
POSTGRES_PASSWORD: password
192192

193193
keycloak:
194-
image: quay.io/keycloak/keycloak:19.0
194+
image: quay.io/keycloak/keycloak:20.0
195195
restart: unless-stopped
196196
networks:
197197
- clowder2

frontend/src/components/Layout.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -193,9 +193,9 @@ export default function PersistentDrawerLeft(props) {
193193
<Box sx={{ marginLeft: "auto" }}>
194194
{loggedOut ? (
195195
<>
196-
{/*<Link href="/auth/register" sx={link}>*/}
197-
{/* Register*/}
198-
{/*</Link>*/}
196+
<Link href="/auth/register" sx={link}>
197+
Register
198+
</Link>
199199
<Link href="/auth/login" sx={link}>
200200
Login
201201
</Link>

frontend/src/components/PublicLayout.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -157,9 +157,9 @@ export default function PersistentDrawerLeft(props) {
157157
</SearchDiv>
158158
<Box sx={{ flexGrow: 1 }} />
159159
<Box sx={{ marginLeft: "auto" }}>
160-
{/*<Link href="/auth/register" sx={link}>*/}
161-
{/* Register*/}
162-
{/*</Link>*/}
160+
<Link href="/auth/register" sx={link}>
161+
Register
162+
</Link>
163163
<Link href="/auth/login" sx={link}>
164164
Login
165165
</Link>

frontend/src/components/navigation/TopBar.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,9 @@ export default function TopBar() {
4040
</Box>
4141
{loggedOut ? (
4242
<>
43-
{/*<Link href="/auth/register" sx={link}>*/}
44-
{/* Register*/}
45-
{/*</Link>*/}
43+
<Link href="/auth/register" sx={link}>
44+
Register
45+
</Link>
4646
<Link href="/auth/login" sx={link}>
4747
Login
4848
</Link>

0 commit comments

Comments
 (0)