mirror of
https://github.com/nestriness/nestri.git
synced 2026-11-22 23:19:50 +02:00
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:
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user