diff --git a/src/frontend/src/flows/verifiableCredentials/allow.ts b/src/frontend/src/flows/verifiableCredentials/allow.ts
index 01d631153d..54b67cb966 100644
--- a/src/frontend/src/flows/verifiableCredentials/allow.ts
+++ b/src/frontend/src/flows/verifiableCredentials/allow.ts
@@ -23,7 +23,7 @@ const allowTemplate = ({
Credential Access Request
- Allow sharing VerifiedEmployee credential issued by
+ Allow verifying credential
${providerOrigin} with
${relyingOrigin}?
@@ -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,
diff --git a/src/frontend/src/flows/verifiableCredentials/prompt.ts b/src/frontend/src/flows/verifiableCredentials/prompt.ts
deleted file mode 100644
index 9adf3cb639..0000000000
--- a/src/frontend/src/flows/verifiableCredentials/prompt.ts
+++ /dev/null
@@ -1,131 +0,0 @@
-import { caretDownIcon, verifyIcon } from "$src/components/icons";
-import { mainWindow } from "$src/components/mainWindow";
-import { KnownDapp } from "$src/flows/dappsExplorer/dapps";
-import { I18n } from "$src/i18n";
-import { IIWebAuthnIdentity } from "$src/utils/iiConnection";
-import { mount, renderPage } from "$src/utils/lit-html";
-import { Chan } from "$src/utils/utils";
-import { TemplateResult, html } from "lit-html";
-import { asyncReplace } from "lit-html/directives/async-replace.js";
-import { vcStepper } from "./stepper";
-
-/* Anchor construction component (for creating WebAuthn credentials) */
-
-const promptTemplate = ({
- _i18n,
- cancel,
- userNumber,
- knownDapp,
- scrollToTop = false,
-}: {
- _i18n: I18n;
- cancel: () => void;
- userNumber: bigint;
- knownDapp: KnownDapp;
- /* put the page into view */
- scrollToTop?: boolean;
-}): TemplateResult => {
- const slot = html`
- ${vcStepper({ current: "prompt" })}
- window.scrollTo(0, 0)) : undefined}>
- ${userNumber},
-
- ${mkChasm({
- image: knownDapp.logoSrc,
- name: knownDapp.name,
- message: html`Some context about ${knownDapp.name}`,
- })}
-
-
- This app would like to:
-
-
-
-
-
-
-
- `;
-
- return mainWindow({
- showFooter: false,
- showLogo: false,
- slot,
- });
-};
-
-export const promptPage = renderPage(promptTemplate);
-
-// TODO: change name
-export const prompt = ({
- userNumber,
- knownDapp,
-}: {
- userNumber: bigint;
- knownDapp: KnownDapp;
-}): Promise => {
- return new Promise((resolve) =>
- promptPage({
- _i18n: new I18n(),
- userNumber,
- knownDapp,
- cancel: () => resolve("canceled"),
- scrollToTop: true,
- })
- );
-};
-
-/** Options to display a "chasm" in the authbox */
-type ChasmOpts = {
- image: string;
- name: string;
- message: TemplateResult;
-};
-
-const mkChasm = ({ image, name, message }: ChasmOpts): TemplateResult => {
- /* Toggle the chasm open/closed */
- const ariaExpanded = new Chan(false);
- const chasmToggle = () => ariaExpanded.send(!ariaExpanded.latest);
- const btnFlipped = ariaExpanded.map((expanded) =>
- expanded ? "c-chasm__button--flipped" : undefined
- );
-
- return html`
- chasmToggle()}
- >
-
-
-
${name}
-
${caretDownIcon}
-
-
-
- `;
-};
diff --git a/src/frontend/src/index.ts b/src/frontend/src/index.ts
index b763ec6382..2f5b3d351e 100644
--- a/src/frontend/src/index.ts
+++ b/src/frontend/src/index.ts
@@ -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);
}
@@ -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 });
}
diff --git a/src/frontend/vc-flow/index.html b/src/frontend/vc-flow/index.html
index e7d4100131..6480a91e53 100644
--- a/src/frontend/vc-flow/index.html
+++ b/src/frontend/vc-flow/index.html
@@ -4,8 +4,6 @@
-
-
Internet Identity
@@ -14,10 +12,5 @@
-
-
-
-