Repository navigation
v0.6.15 — sign in with a phone, and a refresh that returns an id_token
Sign in from a screen that cannot take a password — and an IdP that keeps
a relying party signed in when it refreshes.
«Logg inn med telefonen» (#163)
The login gate can now show a QR and a nine-character code. A phone that
is already signed in approves it, and the screen signs itself in: a car
display, a TV, a borrowed PC — the screens a password manager never
reaches. The grant is RFC 8628 and lives in the IdP.
/auth/device and /auth/device/poll sit beside the auth rail that
already exists. A device code is a credential — spend it after approval
and you get a token — so it goes into an HttpOnly cookie exactly as the
refresh token does, and the page holds nothing. QR encoding is
hand-rolled in regnmed-core::qr like every other format in that crate:
byte mode, level L, versions 1–5, the versions with a single
error-correction block.
This path stays dark in production until somebody runs it:
kubectl -n regnmed exec deploy/regnid -- \
/app/regnid set-grants --client-id regnmed-portal \
authorization_code refresh_token urn:ietf:params:oauth:grant-type:device_codeGrants are an allowlist per client, so the button is there and the call
is refused until that is done. The dev scripts do it; test and prod are
a manual call.
regnid v0.1.4: a refresh grant that answers with an id_token
v0.1.3 answered the refresh grant with an access token and no id_token.
That is legal — OIDC Core §12.1 allows it — and it is nothing at all to
a relying party that authenticates with the id_token: the exchange
succeeds, the RP has no credential it can use, and the user meets the
login gate anyway, once per page reload, with nothing in any log saying
why. An OIDC grant now keeps answering with an id_token. No nonce on
it: that binds one authorization request to one id_token, and a refresh
is not that request (§12.2 says it SHOULD NOT be present).
The portal was never affected — it carries the access token. The RP that
had the symptom is a different one, and this release is cut now for it.
Rotation was never the problem: regnid has revoked the presented refresh
token and returned its replacement all along.
Also in this release
- test rolled to
sha-49957dcand pinned regnid v0.1.4 ahead of prod.