Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
nmattia committed Oct 24, 2023
1 parent fde2362 commit 366097c
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 154 deletions.
4 changes: 2 additions & 2 deletions src/frontend/src/flows/verifiableCredentials/allow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const allowTemplate = ({
<h1 class="t-title t-title--main">Credential Access Request</h1>
</hgroup>
<p class="t-paragraph">
Allow sharing VerifiedEmployee credential issued by
Allow verifying credential
<strong class="t-strong">${providerOrigin}</strong> with
<strong class="t-strong">${relyingOrigin}</strong>?
</p>
Expand Down Expand Up @@ -51,7 +51,7 @@ const allowTemplate = ({

export const allowPage = renderPage(allowTemplate);

// Prompt the allow verifying credentials
// Prompt to allow verifying credentials
export const allow = ({
relyingOrigin,
providerOrigin,
Expand Down
131 changes: 0 additions & 131 deletions src/frontend/src/flows/verifiableCredentials/prompt.ts

This file was deleted.

9 changes: 4 additions & 5 deletions src/frontend/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,12 @@ const init = async () => {
// https://github.com/dfinity/internet-identity#build-features
showWarningIfNecessary();

const [path] = window.location.pathname.split("/").filter(Boolean);

// Redirect to the FAQ
// The canister should already be handling this with a 301 when serving "/faq", this is just a safety
// measure.
if (window.location.pathname === "/faq") {
if (path === "faq") {
const faqUrl = "https://identitysupport.dfinity.org/hc/en-us";
window.location.replace(faqUrl);
}
Expand All @@ -105,10 +107,7 @@ const init = async () => {
const connection = new Connection(readCanisterId());

// Check for VC flow
if (
window.location.pathname === "/vc-flow" ||
window.location.pathname === "/vc-flow/"
) {
if (path === "vc-flow") {
return vcFlow({ connection });
}

Expand Down
7 changes: 0 additions & 7 deletions src/frontend/vc-flow/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<!-- CSP directives injected by the canister -->
<meta replaceme-with-csp />
<title>Internet Identity</title>
<link rel="shortcut icon" href="/favicon.ico" />
<link rel="stylesheet" href="../src/styles/main.css" />
Expand All @@ -14,10 +12,5 @@
<body>
<main id="pageContent" aria-live="polite"></main>
<div id="loaderContainer"></div>

<!-- this is replaced by the backend before serving -->
<!-- XXX: DO NOT CHANGE! or if you do, change the bit that matches on this
exact string in the canister code-->
<script id="setupJs"></script>
</body>
</html>
1 change: 0 additions & 1 deletion src/showcase/src/pages/[page].astro
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ export const iiPageNames = [
"showMessage",
"showSpinner",
"addDeviceSuccess",
"vcPrompt",
"vcAllow",
"vcSelect",
];
Expand Down
8 changes: 0 additions & 8 deletions src/showcase/src/showcase.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ import { TemplateResult, html, render } from "lit-html";
import { asyncReplace } from "lit-html/directives/async-replace.js";

import { allowPage } from "$src/flows/verifiableCredentials/allow";
import { promptPage } from "$src/flows/verifiableCredentials/prompt";
import { selectPage } from "$src/flows/verifiableCredentials/select";

const identityBackground = loadIdentityBackground();
Expand Down Expand Up @@ -641,13 +640,6 @@ export const iiPages: Record<string, () => void> = {
deviceAlias: chromeDevice.alias,
onContinue: () => console.log("Continue"),
}),
vcPrompt: () =>
promptPage({
_i18n: i18n,
userNumber: BigInt(1234),
knownDapp: openChat,
cancel: () => console.log("cancel"),
}),
vcAllow: () =>
allowPage({
relyingOrigin: "https://oc.app",
Expand Down

0 comments on commit 366097c

Please sign in to comment.