Skip to content

Commit

Permalink
Add default title to demo app
Browse files Browse the repository at this point in the history
Signed-off-by: jamshale <jamiehalebc@gmail.com>
  • Loading branch information
jamshale committed Sep 15, 2023
1 parent ae8cd53 commit ad7863b
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions demo/vue/app/frontend/src/router/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,15 +66,15 @@ export default function getRouter(basePath = '/') {
});
window.location.replace(
loginUrl +
'&pres_req_conf_id=' +
Vue.prototype.$config.keycloak.presReqConfId
'&pres_req_conf_id=' +
Vue.prototype.$config.keycloak.presReqConfId
);
}
if (
Vue.prototype.$keycloak.tokenParsed &&
Vue.prototype.$keycloak.tokenParsed.pres_req_conf_id &&
Vue.prototype.$keycloak.tokenParsed.pres_req_conf_id !=
Vue.prototype.$config.keycloak.presReqConfId
Vue.prototype.$config.keycloak.presReqConfId
) {
// console.log('PRES_REQ_CONF_ID mismatch');
// if satisified request was NOT the configured request, login is invalid
Expand All @@ -84,9 +84,12 @@ export default function getRouter(basePath = '/') {
});
window.location.replace(logoutUrl);
} else {
document.title = to.meta.title
? to.meta.title
: process.env.VUE_APP_TITLE;
if (to.meta.title || process.env.VUE_APP_TITLE) {
document.title = to.meta.title
? to.meta.title
: process.env.VUE_APP_TITLE;
} else document.title = 'Demo VC-Authn-OIDC App”'; // default title

if (to.query.r && isFirstTransition) {
router.replace({
path: to.query.r.replace(basePath, ''),
Expand Down

0 comments on commit ad7863b

Please sign in to comment.