← Back to How do I refresh a token?
How does a browser app get the owner's approval?
Short answer
Register your app, send its clientId and exact origin to the platform owner, wait for approval, then sign people in from that origin.
Before you start
Your app's pages are served from one fixed address, and you can run a script that keeps a private key secret.
Words used here (3)
- GilbPlatform
- GilbPlatform is the service that keeps people's and organisations' data in vaults, each at its own web address.
- sign-in token
- A sign-in token is the credential GilbPlatform issues when a person signs in; your app presents it, with a proof, on each request.
- approved origin
- An approved origin is the exact web origin the platform owner approved for one registered app; only it lets that app's pages through.
Steps
Register your app.
Register it as the answer on registering a client shows, with your pages' origin as declaredOrigin, and keep the clientId.
More about this
An origin is the scheme, host and port pages are served from, such as https://my-app.example, with no path and no / at the end. declaredOrigin is only a label: the owner can read it, but what is approved is the origin the owner types.
Send the clientId and the exact origin to the platform owner.
Send both to the platform owner, who runs GilbPlatform, and ask for that origin to be approved for your app.
More about this
The origin must be exactly what the browser sends: http or https, a port, or www makes another origin. Each origin is approved on its own, so a second address, such as one you test on, needs its own approval. There is no screen and no HTTP route for asking.
Wait for the owner's approval.
Wait until the owner tells you the origin is approved; until then, a page on it is refused.
More about this
Before approval, the browser's check before each call, its preflight, answers 403 with an empty body, and the browser does not send the call. An approval reaches every GilbPlatform address, id.gilb.com and the vault hosts, within about 20 seconds, so one call made at once may still be refused: try it again.
Sign people in from that origin.
From your page, sign the person in with an e-mail code, then call the platform with that sign-in token and a new DPoP proof for each request.
More about this
Your approved origin names your app: the token carries your clientId, whatever client the page sends, and no owner or operator standing, the extra powers of the people who run GilbPlatform. It reaches only what the signed-in person owns or has been given. The answers on using the sign-in kit and on refreshing a token show the calls.
Deeper
Also asked:
How does my browser app get approved to call the API? Register your app, then send its clientId and your pages' exact origin to the platform owner, who approves it. An app published at https://<name>.pages.dev with the connector is approved on its own.
How long does approval of my app take? The page gives no time: the platform owner approves each origin you send, and there is no screen or route to ask. Once it is approved, it reaches every GilbPlatform address within about 20 seconds. If you need to know, write to [email protected].
My web app's calls are blocked in the browser. Is it CORS, and what do I do? Most likely: until your page's exact origin is approved, the browser's CORS check, its preflight, answers 403 and the call is not sent. Ask the platform owner to approve that origin, or publish with the connector at https://<name>.pages.dev.
Can I test my web app from localhost before it is approved? Not from a page in the browser: a page served from your own computer is an origin like any other, refused until the platform owner approves it. A script or server that sends no Origin is not checked by this.
Approval lets your origin through; it gives your app no access of its own. What a page can read or write is still only what the signed-in person can. Approval never lets your page use the person's GilbPlatform cookie: the platform's own session tokens stay closed to it.
Approval is only for pages in a browser. An app's server that reads your own vault needs none, and a native app that sends no Origin header is outside this check, so a call that works from such an app proves nothing about your origin.
An app published at https://<name>.pages.dev with the connector needs none of these steps: publishing approves exactly that address for the app on its own, with no request to the platform owner. A site published as a website gets no approval. The answer How do I publish my app from the terminal? shows how.
The platform owner can take an approval back or end your registration; then the preflight answers 403 again. An approved origin can also renew a sign-in and be the address a sign-in e-mail leads back to: the answers on refreshing a token and on signing in from your app and returning the person to it show how.
The full reference, with every field and every answer, is the Developer Guide, GilbPlatform's guide for people who build apps on it, in its chapter Dev.Guide.SignIn, https://appbuilder.gilb.com/base/e/06gkzpwhanxrh55sca1pdkxj88. Its exhibit BrowserApps holds the approval and the refusal. It can be read with no sign-in, as data for programs and AIs rather than as a web page.
Source: GilbPlatform 498d29a0 (live at https://id.gilb.com/version, read 2026-11-11; code read at 498d29a0): src/routes/client-registration.ts:15-20 (registering does not admit; admission needs the owner's t:ClientAdmissionApproval); scripts/approve-client.ts:1-31 (approve <clientId> <origin>, one origin per approval, typed by the owner; revoke; end), header only; src/server/cors.ts:88 (preflight max-age 3600), :544-603 (first-party or attested; session bridges and admin reads never for attested), :605-622 (no credentials for attested), :624-640 (preflight: 403 with no CORS headers, or 204 with access-control-allow-origin); src/server/approved-origin-cache.ts:16-29 (an approval takes effect within the refresh window plus a load, about 19 s at worst); src/routes/email-auth.ts:236-290 (markerForRequest: an approved origin names the app and wins over the body client), :485-509; src/auth/app-standing.ts:1-40; src/auth/renewable-sign-in.ts:190-197 (exact origin); src/routes/session-token.ts + src/auth/session-mint-gate.ts:80-90 (session bridges refuse non-first-party origins); src/auth/machine-token.ts:205-211 (ended registration: no machine token). Public read 2026-11-11: OPTIONS https://id.gilb.com/base/auth/email/verify-code, Origin https://not-approved.example: 403. Dev.Guide.SignIn (A 06gkzpwhanxrh55sca1pdkxj88, pack GilbPlatformDeveloperGuide, 2026-11-11; https://appbuilder.gilb.com/base/e/06gkzpwhanxrh55sca1pdkxj88; read for agreement, not copied) BrowserApps (approval lets the origin through; reach is the person's; only for pages; app server needs none; native without Origin is outside; preflight 403 empty body, verified 2026-10-15); Dev.Guide.AppAccess (A 06gqw6jdn9sgbc9rfbfrwc7rec, pack GilbPlatformDeveloperGuide, 2026-11-11; https://appbuilder.gilb.com/base/e/06gqw6jdn9sgbc9rfbfrwc7rec; read for agreement, not copied) Entry.Server. gilb-signin 0.3.0 (npm latest, read https://registry.npmjs.org/gilb-signin 2026-11-11; gitHead d7682177 = tag v0.3.0; code read at d7682177) THIRD-PARTY-GUIDE.md §0 (one admission path serves every host, measured 2026-09-24). Row: Security.BrowserAppNeedsOwnerApproval. GilbPlatform 0fc5a548 (https://id.gilb.com/version, read 13 November 2026): src/routes/publish.ts:460-485 (an app's https://<name>.pages.dev origin is registered and approved when it is published; none for a website); src/publish/admission.ts:1-37; Proc_v_i_c_PublishPagesDev step 8 (the platform admits exactly that origin on its own). GilbPlatform 0fc5a548: src/server/cors.ts (an origin that is not admitted gets no Access-Control headers, so the browser's CORS preflight fails and the call is not sent).
For developers
curl
is-my-origin-approved.sh
# Ask as a browser would before a call from your page. Nothing is sent but the question.
curl -s -o /dev/null -w "%{http_code}\n" -X OPTIONS https://id.gilb.com/base/auth/email/verify-code \
-H "Origin: <origin of your app>" \
-H "Access-Control-Request-Method: POST" \
-H "Access-Control-Request-Headers: content-type"
# 403: not approved (empty body). 204: approved; the answer then names your origin
# in access-control-allow-origin.
Checked against GilbApp d529620.