Skip to content

Commit

Permalink
add org section
Browse files Browse the repository at this point in the history
  • Loading branch information
rohanharikr committed Oct 2, 2024
1 parent dc0e7fd commit 8de6bd6
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions S3/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,10 @@ <h2 class="opacity-80" id="full-name"></h2>
<h3 class="opacity-60">Email</h3>
<h2 class="opacity-80" id="email"></h2>
</div>
<div>
<h3 class="opacity-60">Organization</h3>
<h2 class="opacity-80" id="org"></h2>
</div>
</div>
</div>
</div>
Expand Down Expand Up @@ -435,14 +439,14 @@ <h2 class="opacity-80" id="email"></h2>
}

function hydrate() {
const { name, nickname, picture, email, phone } = data;
const { name, picture, email, org } = data;

$("full-name").innerText = name;
$("preferred-name").innerText = nickname;
$("preferred-name").innerText = name.split(" ")[0]; //tbd: hack -- not probably a good idea
$("email").innerText = email;
$("picture").src = picture;
$("picture").style.backgroundImage = `url('${picture}')`;
// $("phone").innerText = phone;
$("org").innerText = org?.domain;
}

function removeLoader() {
Expand All @@ -465,7 +469,7 @@ <h2 class="opacity-80" id="email"></h2>
url.searchParams.append("response_mode", "fragment");
url.searchParams.append("response_type", "id_token");
url.searchParams.append("account", "managed");
url.searchParams.append("scope", "openid name nickname picture email");
url.searchParams.append("scope", "openid profile");
if(loginHint) {
url.searchParams.append("login_hint", loginHint);
}
Expand Down

0 comments on commit 8de6bd6

Please sign in to comment.