3f0e76f turned the page-load check that hides the passkey button into a
second loginWebAuthn() function but kept its closing "});". That is a
syntax error, so none of the login page's script ran: Sign in with
Passkey did nothing and the button no longer hid on browsers without
passkey support. Put the DOMContentLoaded listener back.
Apps that mix live values (a clock) with cached web data still change
between renders, so 'shows the same data' was too strong.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Add a helper line saying 0 re-renders every rotation, plus a
click-to-open note explaining that an app's own cache TTL for web data
can keep the display unchanged between renders.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Fill device.star's latest_firmware_version() from
GetLatestFirmwareVersionForDevice, so an app can show a firmware update
based on the firmware this server has (and would install), rather than
checking GitHub itself. Also adapt renderer.Render to Pixlet's
RenderResult return value.
Pass host info through the new os.Root app loading (GetSchema, appSchema
and its test hook), and point go.mod at upstream Pixlet main, which now
includes tronbyt/pixlet#491, instead of the fork.
Keep hostname matching for VPN-only names while letting reverse-proxy
hostnames (for example sslip.io) queue firmware over https for devices
that connect by public IP.
Fixes#1022
Co-authored-by: Cursor <cursoragent@cursor.com>
Tavdog suggested removing the badge altogether. When no release is selected
by default (only unprefixed tags), the button label now follows the first
option, which is the one the browser shows.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Show "Up to date" or "Update available: vX" next to the device's
firmware version, label the install button "Reinstall" while the
selected version is already installed, rename the OTA badge to
"Recommended method", and give the device card's update pill
screen-reader text.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The firmware update badge next to the device name could break across
two lines and look cut off. Show the new version on the card's
Firmware button instead, and keep the remaining heading badges in one
piece when they wrap.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Keep the default port in GetBaseURL and leave it out only in OAuth
redirect URIs, so OIDC redirect URIs registered with a provider do not
change.
- Send OAuth requests to the endpoints as entered. Only the issuer key
uses the normalized form, so a provider that needs a trailing slash
still works.
- Show the client form again when it does not validate, with the same
client ID and redirect URI and the values entered, instead of starting
a new client.
- Bind a pending sign-in to the App.ID, so a new app that reuses the
iname before the callback is not signed in.
- Write a refreshed token only if it still has the refresh token the
refresh used, so a refresh that finishes after a new sign-in neither
overwrites it nor marks it for re-authentication. Save it even when the
render is canceled.
- Refuse to write a secret with the reserved enc: prefix, which Scan
would refuse to read back.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signs in to a real pixlet app with a server-managed OAuth2 field (pixlet
v0.55.1) and checks that the rendered app calls its API with the token.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Schema field icons from Font Awesome's brand set (github, spotify,
...) rendered as a missing glyph, since every icon got the solid font.
Brand names are now read from brands.min.css and get fa-brands.
- GetBaseURL kept the scheme's default port when a proxy sent
X-Forwarded-Port: 443, so OAuth redirect URIs read
https://host:443/...; providers compare them as strings.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Apps with a schema.OAuth2 field that declares a token_endpoint no longer
need Tidbyt's OAuth relay or encrypted secrets. Users register OAuth
clients for themselves, admins can share them with every user, and the
server signs the user in and hands the app a fresh access token at
render time.
- OAuthClient and OAuthToken models; secrets and tokens use data.Secret,
the hook for encryption at rest later
- A client is offered to an app only when the normalized pair of
authorization and token endpoints matches; the client secret is only
ever sent to the token endpoint stored with the client
- Settings page /settings/oauth to create, edit and delete clients, with
a per-client redirect URI shown before saving
- OAuth2 field on the app config page: pick a client, sign in, disconnect
- Authorization code flow with PKCE and a one-time state in the session;
tokens are refreshed before render and marked for re-authentication
when the provider rejects the refresh token
- Tokens are deleted with their app, device or user, and when a client
stops being shared or moves to other endpoints
Requires tronbyt/pixlet support for token_endpoint and
authorization_params in schema.OAuth2.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
#973 dropped the previewApp call from the config page's auto-refresh,
so option changes only updated the browser preview and the device waited
for rotation to show the new render.
Restore the push for local apps. External provider apps still only push
from the Preview button since their renders are expensive.
The startup thumbnail preheat could be scheduled after a test registered
a mock provider, whose ListApps succeeds and makes ensureCleanPreviewCache
wipe the test app's renders mid-test.
* fix(server): access device images through os.Root
Open the device's webp directory as an os.Root and read, write and
delete renders, chunks, previews and pushed images through it. Flatten
path separators in app names, serve previews with ServeContent, and
match cleanup by suffix instead of globbing.
* fix(server): validate installation IDs on push and import
Reject IDs that aren't a single filename or that start with "__", so
installations can't share files or land in the ephemeral push namespace.
Open the image root before deleting an installation so a failure can be
retried.
A device API key could list all of its owner's devices, since
/v0/devices was the only /v0 route not scoped to the authenticated
device. Return only the key's own device in that case.
saveSession only checked r.URL.Scheme, which ProxyMiddleware sets from
X-Forwarded-Proto. When the server terminates TLS itself, the scheme is
empty, so the session cookie was sent without the Secure flag.
Now uses requestScheme, which also checks r.TLS.
Admins can already point the system apps repo at any URL, so blocking
their uploads and custom repos adds no protection. BLOCK_CUSTOM_APPS now
only restricts non-admin users, matching the request in #1011.
The block check now runs after RequireLogin so it can see the user,
scheduled refreshes skip only non-admin repos, and templates use a
per-user CustomAppsAllowed flag.
When enabled, users cannot upload apps or set/refresh a custom apps
repository. Removing an existing repository is still allowed, imported
user configs no longer restore a repo URL, scheduled custom repo
refreshes are skipped, and the related UI is hidden.