feat(auth): approving the installer says it adds a host

The device confirmation page asks "Is this you?" whatever is asking,
which is right for signing an app in and undersells approving a
computer as a host on your account.

The issuer gains `deviceConfirm`, wording looked up by client id. It is
chosen by the issuer and never built from the request, so a grant still
cannot introduce itself in words of its own. The installer's page reads
"Add a computer as a Nestri host?" over the code to compare with the
terminal; every other client keeps the generic page. The preview gains
the new state.
This commit is contained in:
Wanjohi
2026-10-16 00:55:24 +03:00
parent 45c82ec369
commit 8cfec951c6
7 changed files with 97 additions and 5 deletions
+12
View File
@@ -23,6 +23,7 @@ import { MARK_CODE, MARK_GITHUB, MARK_GOOGLE } from '@nestri/auth/ui/mark';
import { HtmlRenderer } from '@nestri/auth/ui/render';
import type { Screen } from '@nestri/auth/ui/screen';
import { deviceConfirm } from '../src/index.js';
import { THEME_NESTRI } from '../src/theme.js';
const PORT = Number(process.env.PORT ?? 1338);
@@ -120,6 +121,17 @@ const STATES: State[] = [
csrf: 'x'
})
},
{
id: 'device-confirm-installer',
group: 'Device',
label: 'Add a host?',
screen: () =>
IssuerScreens.deviceConfirm({
userCode: 'BCDF3467',
csrf: 'x',
wording: deviceConfirm('installer')
})
},
{
id: 'device-approved',
group: 'Device',