mirror of
https://github.com/better-auth/better-auth.git
synced 2026-07-28 06:47:20 -05:00
next's #9069 rewrote generic-oauth to flow through the core social provider and callback. The #9799 accessTokenExpiresIn source fix merged in cleanly (its config field and the applyDefaultAccessTokenExpiry wiring land on the three token paths); main's regression tests still targeted the old signIn.oauth2 plugin API. This ports them onto signIn.social so they keep guarding the behavior: - #9799: getAccessToken refreshes once the accessTokenExpiresIn window passes when the provider omits expires_in, does not refresh when it is unset, and applies it to a custom getToken result. - #9792: the verify-email link preserves the encoded callbackURL. - #9702: a session hook throwing an APIError redirects to the cross-origin errorCallbackURL with the hook's code (proves the rewritten callback's hook-error forwarding). - #9578: implicit-link tests mark the local user verified so linking is allowed under the default-on requireLocalEmailVerified gate. A stale IDP-bounce assertion is updated to next's state-error vocabulary. All 71 tests pass. (cherry picked from commit 52adab0db3f463295a0c4e3152d770f4ce40b2d2)