Skip to content

Commit

Permalink
fix (#32)
Browse files Browse the repository at this point in the history
  • Loading branch information
rohanharikr authored Jun 17, 2024
1 parent 1d07c61 commit 4e981de
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions src/App.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,7 @@
}
cleanURL();
const id_token = queryParams.get("id_token");
const loginHint = queryParams.get("login_hint");
const code = queryParams.get("code");
const initiate_login = queryParams.get("initiate-login");
const iss = queryParams.get("iss");
Expand All @@ -309,11 +310,16 @@
const parts = issUrl.hostname.split('.');
parts.shift();
const domain = parts.join('.');
const requestURL = new URL('https://wallet.' + domain)
if(queryParams.has('login_hint')) {
requestUrl.searchParams.set('login_hint', queryParams.get('login_hint'))
let _requestUrl = makeRequestURL(
'https://wallet.' + domain,
states.scopes,
states.query_params,
"request"
)
if(loginHint) {
_requestUrl += '&login_hint=' + loginHint
}
window.location.href = requestURL.href;
window.location.href = _requestUrl;
} catch(err) {
console.error(err)
errorNotification = 'Invalid Issuer URL'
Expand Down

0 comments on commit 4e981de

Please sign in to comment.