Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions internal/oauth/oauth_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -929,8 +929,11 @@ func TestTheConsentPage(t *testing.T) {
page := string(body)
for _, want := range []string{"Let Claude into your home?", "From example.com. FTW Cloud does not know this client", "127.0.0.1:8123",
"a program on this computer", "<svg", AppLink, scopeWords[ScopeDispatchHold], "Control lasts minutes",
// An owner with no app approves and removes on the box's own page.
"open Settings, then Access, and type", "in the FTW app or on your box"} {
// The QR code or the link opens the app; the code is for an owner
// who has neither, in the app or on the box's own page.
"scan the QR code with your phone's camera, or tap the button on your phone",
"Type this code in the FTW app under Settings → Assistants and support → Add an assistant, or on your box's own page under Settings → Access",
"in the FTW app or on your box"} {
if !strings.Contains(page, want) {
t.Fatalf("the page lacks %q", want)
}
Expand Down
4 changes: 2 additions & 2 deletions internal/oauth/page.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,9 +130,9 @@ var consentTmpl = template.Must(template.New("consent").Parse(`<!doctype html>
<div class="approve">
<div class="qr">{{.QR}}</div>
<div>
<p>Approve in the FTW app: scan the code with your phone, or</p>
<p>Approve in the FTW app: scan the QR code with your phone's camera, or tap the button on your phone.</p>
<p><a class="button" href="{{.Link}}">Open the FTW app</a></p>
<p class="muted">No app? On your box's own page, open Settings, then Access, and type</p>
<p class="muted">Can't do either? Type this code in the FTW app under Settings → Assistants and support → Add an assistant, or on your box's own page under Settings → Access.</p>
<p class="code">{{.Code}}</p>
</div>
</div>
Expand Down
Loading