@@ -17,11 +17,16 @@ the dev redirect URIs below.
1717
1818## The dev-only values (client ` thunderbird-accounts ` , realm ` tbpro ` )
1919
20- The reset reverts the whole client to its stage config, so ALL of these need re-applying:
21-
22- - redirect URIs: ` https://accounts.tb-dev.thunderbird.dev/oidc/callback/* ` and
23- ` https://accounts.tb-dev.thunderbird.dev/login/ `
24- - web origin: ` https://accounts.tb-dev.thunderbird.dev `
20+ The reset reverts the whole client to its stage config, so ALL of these need re-applying.
21+ tb-dev accounts is reachable via ** two** hosts — the public ALB (` accounts.tb-dev.thunderbird.dev ` )
22+ AND the tailnet (` accounts-tb-dev.tail2726a2.ts.net ` , used to reach ` /admin ` ) — so ** both** need
23+ login + logout callbacks, or you get ` invalid_redirect_uri ` ("We are sorry").
24+
25+ - redirect URIs (per host: ` /oidc/callback/* ` , ` /login/ ` , ` /logout/callback ` ):
26+ - ` https://accounts.tb-dev.thunderbird.dev/{oidc/callback/*, login/, logout/callback} `
27+ - ` https://accounts-tb-dev.tail2726a2.ts.net/{oidc/callback/*, login/, logout/callback} `
28+ - web origins: ` https://accounts.tb-dev.thunderbird.dev ` and ` https://accounts-tb-dev.tail2726a2.ts.net `
29+ - post-logout policy: attribute ` post.logout.redirect.uris = + ` (validate logout against the redirect URIs)
2530- ** ` rootUrl ` / ` baseUrl ` / ` adminUrl ` ** — these back the Keycloak ** "Back to Application"** link;
2631 if left at the stage value the button sends users to ` accounts-stage.tb.pro ` . Set
2732 ` rootUrl=https://accounts.tb-dev.thunderbird.dev ` , ` baseUrl=/ ` , ` adminUrl=https://accounts.tb-dev.thunderbird.dev ` .
@@ -62,10 +67,12 @@ kubectl --context tb-dev exec -n keycloak-customer keycloak-customer-0 -c keyclo
6267 --fields id --format csv --noquotes)
6368
6469 /opt/keycloak/bin/kcadm.sh update clients/$CID -r tbpro \
65- -s ' " '" ' redirectUris=["https://accounts-stage.tb.pro/login/","https://accounts-stage.tb.pro/oidc/callback/*","https://accounts.tb-dev.thunderbird.dev/oidc/callback/*","https://accounts.tb-dev.thunderbird.dev/login/"]' " '" ' \
66- -s ' " '" ' webOrigins=["accounts-stage.tb.pro","https://accounts.tb-dev.thunderbird.dev"]' " '" '
70+ -s ' " '" ' redirectUris=["https://accounts-stage.tb.pro/login/","https://accounts-stage.tb.pro/oidc/callback/*","https://accounts.tb-dev.thunderbird.dev/oidc/callback/*","https://accounts.tb-dev.thunderbird.dev/login/","https://accounts.tb-dev.thunderbird.dev/logout/callback","https://accounts-tb-dev.tail2726a2.ts.net/oidc/callback/*","https://accounts-tb-dev.tail2726a2.ts.net/login/","https://accounts-tb-dev.tail2726a2.ts.net/logout/callback"]' " '" ' \
71+ -s ' " '" ' webOrigins=["accounts-stage.tb.pro","https://accounts.tb-dev.thunderbird.dev","https://accounts-tb-dev.tail2726a2.ts.net"]' " '" ' \
72+ -s ' " '" ' attributes."post.logout.redirect.uris"=+' " '" ' \
73+ -s "rootUrl=https://accounts.tb-dev.thunderbird.dev" -s "baseUrl=/" -s "adminUrl=https://accounts.tb-dev.thunderbird.dev"
6774
68- /opt/keycloak/bin/kcadm.sh get clients/$CID -r tbpro --fields redirectUris,webOrigins # verify
75+ /opt/keycloak/bin/kcadm.sh get clients/$CID -r tbpro --fields redirectUris,webOrigins,rootUrl,baseUrl,adminUrl # verify
6976
7077 AID=$(/opt/keycloak/bin/kcadm.sh get users -r master -q username=tmp-admin --fields id --format csv --noquotes)
7178 /opt/keycloak/bin/kcadm.sh delete users/$AID -r master # remove the throwaway admin
0 commit comments