Skip to content

Commit

Permalink
feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewkmin committed Nov 28, 2023
1 parent 120c81a commit 1f63a8e
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 11 deletions.
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ LABEL org.opencontainers.image.source https://github.com/tkhq/frames

COPY nginx.conf /etc/nginx/nginx.conf

# maintain recovery for backwards compatibility
COPY auth /usr/share/nginx/recovery
COPY auth /usr/share/nginx/auth
COPY export /usr/share/nginx/export

Expand Down
15 changes: 6 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,19 @@
# Frames

This repository contains code for the recovery, export, and auth components of Turnkey. These components can be embedded as iframes by users to support end-users.
This repository contains code for the auth (which includes recovery) and export components of Turnkey. These components can be embedded as iframes by users to support end-users.

## Email Recovery
This self-contained HTML page is meant to be used as a standalone document to help first-party Turnkey root users. It's also going to be embedded as an iframe to help with sub-org root recovery.
## Auth
This self-contained HTML page is meant to be used for the following use cases:
- As a standalone document to enable first-party Turnkey root users to perform recovery and auth
- Embedded as an iframe for sub-org root recovery and auth

This page is hosted at https://auth.turnkey.com/
This page is hosted at https://auth.turnkey.com/, but we will retain https://recovery.turnkey.com/for compatibility.

## Key and Wallet Export
This self-contained HTML page is meant to be used as either a standalone document or to be embedded as an iframe.

This page is hosted at https://export.turnkey.com/

## Auth (via Email)
This self-contained HTML page is meant to be used as either a standalone document or to be embedded as an iframe.

This page is also hosted at https://auth.turnkey.com/

# Getting Started

Clone the repo:
Expand Down
4 changes: 2 additions & 2 deletions auth/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -864,7 +864,7 @@ <h2>Message log</h2>
// TODO: find a way to filter messages and ensure they're coming from the parent window?
// We do not want to arbitrarily receive messages from all origins.
window.addEventListener("message", async function(event) {
if (event.data && event.data["type"] == "INJECT_CREDENTIAL_BUNDLE") {
if (event.data && (event.data["type"] == "INJECT_CREDENTIAL_BUNDLE" || event.data["type"] == "INJECT_RECOVERY_BUNDLE")) {
TKHQ.logMessage(`⬇️ Received message ${event.data["type"]}: ${event.data["value"]}`);
try {
await onInjectBundle(event.data["value"])
Expand All @@ -891,7 +891,7 @@ <h2>Message log</h2>
}, false);

/**
* Event handlers to power the recovery flow in standalone mode
* Event handlers to power the recovery and auth flows in standalone mode
* Instead of receiving events from the parent page, forms trigger them.
* This is useful for debugging as well.
*/
Expand Down

0 comments on commit 1f63a8e

Please sign in to comment.