feat-dev: add U2F iframe for desktop client authentication (#2236)

This commit is contained in:
Karol Sójko
2023-03-07 00:52:35 +01:00
committed by GitHub
parent e5ca69fc8e
commit cf5330d7cf
25 changed files with 362 additions and 73 deletions

View File

@@ -36,6 +36,8 @@ import { WebApplication } from './Application/Application'
import { createRoot, Root } from 'react-dom/client'
import { ElementIds } from './Constants/ElementIDs'
import { setDefaultMonospaceFont } from './setDefaultMonospaceFont'
import { RouteParser, RouteType } from '@standardnotes/ui-services'
import U2FAuthIframe from './Components/U2FAuthIframe/U2FAuthIframe'
let keyCount = 0
const getKey = () => {
@@ -71,6 +73,13 @@ const startApplication: StartApplication = async function startApplication(
setDefaultMonospaceFont(device.platform)
const route = new RouteParser(window.location.href)
if (route.type === RouteType.AppViewRoute && route.appViewRouteParam === 'u2f') {
root.render(<U2FAuthIframe />)
return
}
root.render(
<ApplicationGroupView
key={getKey()}