Skip to content

Commit

Permalink
add a config to add myaccount app url as it is different from base pa…
Browse files Browse the repository at this point in the history
…th in asgardeo.
  • Loading branch information
malithie committed Apr 25, 2024
1 parent 131e292 commit 2a1f7d1
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions petcare-sample/b2c/web-app/petdesk/web/react/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ window.config = {
clientID: "<CONFIGURED_SPA_CLIENT_ID>",
signInRedirectURL: "http://localhost:5173",
signOutRedirectURL: "http://localhost:5173",
myAccountAppURL: "",
resourceServerURL: "http://localhost:9090",
scope: ["openid", "email", "profile"]
};
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ export default function MenuListComposition(props: {
};

const gotoMyAccount = () => {
window.open(getConfig().baseUrl + '/myaccount', '_blank');
window.open(getConfig().myAccountAppURL, '_blank');
};

return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ interface Config {
scope: string[];
signInRedirectURL: string;
signOutRedirectURL: string;
myAccountAppURL: string;
resourceServerURL: string;
}

Expand All @@ -36,6 +37,7 @@ const authConfig = {
clientID: window.config.clientID,
signInRedirectURL: window.config.signInRedirectURL,
signOutRedirectURL: window.config.signOutRedirectURL,
myAccountAppURL: window.config.myAccountAppURL,
resourceServerURL: window.config.resourceServerURL,
scope: ["openid", "profile", "email"],
};
Expand Down

0 comments on commit 2a1f7d1

Please sign in to comment.