credential broker: Play tokens from POST /api/google/token (cached, single flight, local key fallback), grants and APIs per package in validate, Play write preflight, apps check and the desktop Accounts view; Google 403 names the API or grant, no retry
This commit is contained in:
parent
304407e523
commit
2c5e30090f
27 changed files with 1145 additions and 43 deletions
|
|
@ -2085,6 +2085,13 @@ export const en = {
|
|||
'cm.ignoredNoReads': "Ignored apps are not read",
|
||||
'cm.ignore': "Ignore",
|
||||
'acct.devId': 'Play developer id {id}',
|
||||
'acct.viaBroker': 'tokens from the credential broker',
|
||||
'acct.viaFile': 'local key file',
|
||||
'acct.grantsTitle': 'Play permissions on the credential broker',
|
||||
'acct.grantsOk': 'everything storebound needs',
|
||||
'acct.grantsMissing': 'missing: {list}',
|
||||
'acct.grantsNone': 'no permission data',
|
||||
'acct.notRegistered': 'not registered on the broker',
|
||||
'acct.noDevId': 'no Play developer id',
|
||||
'acct.devIdLabel': 'Play developer account id',
|
||||
'acct.devIdHint': "The digits after /developers/ in the Play Console address. With it, Play Console links open each app's own page; the CLI uses it too.",
|
||||
|
|
|
|||
|
|
@ -2087,6 +2087,13 @@ export const tr: Record<keyof typeof en, string> = {
|
|||
'cm.ignoredNoReads': "Yok sayılan uygulamalar okunmaz",
|
||||
'cm.ignore': "Yok say",
|
||||
'acct.devId': 'Play geliştirici kimliği {id}',
|
||||
'acct.viaBroker': 'jetonlar kimlik aracısından',
|
||||
'acct.viaFile': 'yerel anahtar dosyası',
|
||||
'acct.grantsTitle': 'Kimlik aracısındaki Play izinleri',
|
||||
'acct.grantsOk': 'storebound için gereken her şey var',
|
||||
'acct.grantsMissing': 'eksik: {list}',
|
||||
'acct.grantsNone': 'izin bilgisi yok',
|
||||
'acct.notRegistered': 'aracıda kayıtlı değil',
|
||||
'acct.noDevId': 'Play geliştirici kimliği yok',
|
||||
'acct.devIdLabel': 'Play geliştirici hesabı kimliği',
|
||||
'acct.devIdHint': 'Play Console adresinde /developers/ sonrasındaki rakamlar. Girilince Play Console bağlantıları her uygulamanın kendi sayfasını açar; CLI de kullanır.',
|
||||
|
|
|
|||
|
|
@ -92,6 +92,7 @@ function AccountRow({ a, busy, setBusy, onError }: { a: Account; busy: string |
|
|||
{used ? ` · ${t('acct.folders', { count: used })}` : ''}
|
||||
{a.kind === 'play' && (a.developerId ? <> · <span className="mono-id selectable" title={t('acct.devIdHint')}>{t('acct.devId', { id: a.developerId })}</span></> : <> · <span title={t('acct.devIdHint')}>{t('acct.noDevId')}</span></>)}
|
||||
{check?.principal ? <> · <span className="mono-id selectable">{check.principal}</span></> : null}
|
||||
{a.kind === 'play' && check?.source ? ` · ${check.source === 'broker' ? t('acct.viaBroker') : t('acct.viaFile')}` : ''}
|
||||
</div>
|
||||
</div>
|
||||
<div className="actions">
|
||||
|
|
@ -122,6 +123,22 @@ function AccountRow({ a, busy, setBusy, onError }: { a: Account; busy: string |
|
|||
</Notice>
|
||||
</div>
|
||||
)}
|
||||
{check?.grants && check.grants.length > 0 && (
|
||||
<div className="acct-fix acct-grants">
|
||||
<div className="small strong">{t('acct.grantsTitle')}</div>
|
||||
<ul className="small">
|
||||
{check.grants.map(g => (
|
||||
<li key={g.packageName}>
|
||||
<span className="mono-id selectable">{g.packageName}</span>{': '}
|
||||
{!g.registered ? <span className="muted">{t('acct.notRegistered')}</span>
|
||||
: g.missing.length ? <Chip tone="warn">{t('acct.grantsMissing', { list: g.missing.join(', ') })}</Chip>
|
||||
: g.grants ? <Chip tone="ok">{t('acct.grantsOk')}</Chip> : <span className="muted">{t('acct.grantsNone')}</span>}
|
||||
{g.grants && g.grants.length > 0 && <span className="muted mono-id" title={(g.enabledApis ?? []).join(', ')}>{` ${g.grants.join(', ')}`}</span>}
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
</div>
|
||||
)}
|
||||
{h?.error && <div className="acct-fix"><Notice tone="bad">{h.error}</Notice></div>}
|
||||
</div>
|
||||
);
|
||||
|
|
|
|||
|
|
@ -24,3 +24,5 @@
|
|||
.scr-accounts .acct-fix { padding: 0 16px 16px; }
|
||||
.scr-accounts .acct-add { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px; align-items: start; }
|
||||
.scr-accounts .acct-add .form { gap: 14px; }
|
||||
.scr-accounts .acct-grants ul { margin: 4px 0 0; padding-left: 18px; display: grid; gap: 2px; }
|
||||
.scr-accounts .acct-grants li { overflow-wrap: anywhere; }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue