Repository navigation
Version 1.30.0
New Features
provider.CustomHandlerOpt.AvatarSaversets the avatar saver for one custom provider, for example to fetch a user-set picture URL without the access token #346 @paskalOpts.AuthRoutePath: when set, the handler answers only its routes right under the mount as seen by the handler, and extra prefixes or escaped provider or action segments get 404 #346 @paskal- Verify message template fields
{{.LinkToken}}, a separately signed token for a sign-in link, and{{.URL}}#339 @paskal
Behavior Changes
- A configured
Validatorcan reject a block thatClaimsUpdadds during refresh. Refreshed claims without a user are refused #345 @paskal - With a
Validatorconfigured,Validateruns twice on a successful refresh, and a customTokenService.Setcan no longer write a status or body #345 @paskal - The verify provider hashes a 40-hex address like any other. Such users get a new id. Existing sessions can keep renewing under the old id, and retiring their signing secret invalidates them #345 @paskal
- A login without a user id is refused, and a custom
MapUserFnshould return an empty id when there is none #332 #335 #338 @paskal /auth/userand/auth/statusrun the same checks asAuthand can refresh an expired cookie token #340 @paskal- A verify user name ending with
:maps to the id of the actual address #340 @paskal
Bug Fixes
Opts.RefreshCachegives each request its own copy of the claims and refreshes expired entries; a shared attributes map could crash the process under concurrent writes #348User.SliceAttrreturns string lists read back from a token #347- The confirmation store keys verify links on their signed content, so a re-encoded signature cannot replay a used link. Keys in a shared
VerifConfirmationStorechange on upgrade #342 - The replay marker of a used confirmation token is kept through its expiry second aeabc78
- Custom confirmation tokens with other than three segments are hashed in full, so distinct tokens no longer collide b9378ee
Tracekeeps the handler'sContent-Typeon a failed refresh #343- The oauth1 and oauth2 callbacks log the real parse error for user info that is not JSON #334
- Provider fixes for Apple, Telegram, dev, Patreon and Discord, and
audandnoavafor oauth1 and Apple logins #340 @paskal klauspost/compressv1.20.5 for GO-2026-6865 #340 @paskal
Improvements
- Valid HTML5 for the dev login form and the custom server page #333 @paskal
- README, doc comments and example corrected against the code #336 #341 @paskal #344
- README notes that v1 depends on
golang-jwt/jwtv3, which has GO-2025-3553 with no fixed v3 release, and that v1 users should move to v2 #341 @paskal