Skip to content

Commit

Permalink
Merge pull request #336 from bcgov/feature/314-add-default-title-to-d…
Browse files Browse the repository at this point in the history
…emo-app

Feature/314 add default title to demo app
  • Loading branch information
esune authored Sep 18, 2023
2 parents ae8cd53 + ad7863b commit 136314c
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 136314c

Please sign in to comment.