v26.4.17
v26.4.17
GitHub sign-in exposes public profile fields in raw claims
The github and github-app social sign-in providers now pass the user's public GitHub profile to the Jsonnet data mapper as
claims.raw_claims, for example login, created_at, company, and public_repos. Private account data, such as private
repository counts, plan, and two-factor status, and the profile email are not included.
Login failure web hooks run when the identity is disabled
The login failure web hook now also runs when Ory Kratos Identities rejects a login because the identity is disabled. This
applies to every login method that the trigger covers, including social sign-in. ctx.identity is the disabled identity, with
state: "inactive", so your endpoint can tell these attempts apart from wrong credentials.
See how many backup recovery codes a user has left
Ory Kratos Identities now reports how many backup recovery codes a user has left, so your UI can remind users to generate new codes before they run out.
While an identity has backup recovery codes, the lookup_secret group of the settings flow contains a text node with the ID
lookup_secret_remaining. Its message, 1050025, reads "You have 9 of 12 backup recovery codes left." and carries the counts in
the remaining_codes and total_codes context fields.
After a login with a backup recovery code, the JSON response to a successful login includes a lookup_secret object with
remaining_codes and total_codes. Native apps and browser apps that submit the login as JSON receive it. Logins that end in a
redirect don't include it, and neither do logins that continue an OAuth2 login challenge. Ory Elements needs this version to show
the count before the user reveals the codes, and to show its reminder after a login that leaves 3 or fewer codes. See
Lookup Secrets.
Webhooks and session risk rules can read the caller's network
Every Kratos webhook, the password migration hook, and the session JWT claims hook now receive ctx.asn, the number of the
network (autonomous system) that the caller's IP address belongs to. Session risk rules can read the same number as request.asn,
for example request.asn in [64496, 64511].
Kratos reads the number from the X-Ory-Ip-Asn request header, as a decimal number without the AS prefix. Without a reverse
proxy that sets this header, ctx.asn and request.asn are 0. If your proxy sets it, it must replace the header on every
incoming request, or a caller can choose their own network.