Skip to content

Commit

Permalink
https://github.com/keycloakify/keycloakify/issues/651#issuecomment-23…
Browse files Browse the repository at this point in the history
…51048440
  • Loading branch information
garronej committed Oct 5, 2024
1 parent 3a2574d commit 14fd233
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
3 changes: 3 additions & 0 deletions scripts/README-template.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
<img src="https://github.com/keycloakify/keycloak-account-ui/actions/workflows/ci.yaml/badge.svg?branch=main">
</a>
<a href="https://www.npmjs.com/package/@keycloakify/keycloak-account-ui/v/{{THIS_VERSION}}">
https://www.npmjs.com/package/@keycloakify/keycloak-account-ui/v/25.0.4-rc.8
https://www.npmjs.com/package/@keycloakify/keycloak-account-ui/v/25.0.4-rc.8
https://www.npmjs.com/package/@keycloakify/keycloak-account-ui/v/25.0.4-rc.8
<img src="https://img.shields.io/npm/dm/@keycloakify/keycloak-account-ui">
</a>
<p align="center">
Expand Down
10 changes: 7 additions & 3 deletions src/KcAccountUiLoader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,10 @@ function init(
return authUrl;
})();

const referrerUrl = readQueryParamOrRestoreFromSessionStorage({
name: "referrer_uri",
});

const environment = {
serverBaseUrl,
authUrl,
Expand All @@ -220,13 +224,13 @@ function init(
clientId,
resourceUrl,
logo: logoUrl.substring(resourceUrl.length),
logoUrl: logoUrl,
logoUrl:
referrerUrl === undefined ? "/" : referrerUrl.replace("_hash_", "#"),
baseUrl: `${kcContext.baseUrl.scheme}:${kcContext.baseUrl.rawSchemeSpecificPart}`,
locale: kcContext.locale,
referrerName:
readQueryParamOrRestoreFromSessionStorage({ name: "referrer" }) ?? "",
referrerUrl:
readQueryParamOrRestoreFromSessionStorage({ name: "referrer_uri" }) ?? "",
referrerUrl: referrerUrl ?? "",
features: {
isRegistrationEmailAsUsername:
kcContext.realm.registrationEmailAsUsername,
Expand Down

0 comments on commit 14fd233

Please sign in to comment.