Sign in with U-net
Add QR-based login where your service receives only a stable service-scoped ID and a short-lived signed assertion.
Mental model
Your website creates a one-time login session. The browser renders a QR payload. The user scans it in the U-net app, confirms with the device security boundary, and U-net returns a signed assertion to the waiting browser.
The assertion contains the service ID, scoped user ID, session ID, issue time, and expiry. It does not contain a public U-net ID, holder ID, email, phone number, FCM token, private key, or attestation data.
- Store `scopedUserId` as the account identifier for your service.
- Verify `assertionJws` on your server before creating a session.
- Treat denied and expired QR sessions as normal user outcomes.
Create and poll a login QR
Use `@union-networks/web-login` in browser code when the page is opened outside U-net.
QR states: creating -> pending -> approved | denied | expired
Verify the assertion on your server
Never trust a scoped ID copied directly from browser JavaScript. Send the assertion to your server and verify it there.
Server creates app session only after HMAC assertion verification.