jojo/services/auth/source/oauth2
Erwan Leboucher 0211c1eace feat: persist OAuth2/OIDC sign-in via IdP re-validation (#12321)
The session cookie has no Max-Age, so it is lost when the browser closes. The password flow compensates via a "Remember me" checkbox issuing an LTA cookie; OAuth2/OIDC sign-in had no such UI.

Issuing a regular LTA cookie after an OAuth callback would skip the IdP for LOGIN_REMEMBER_DAYS. Instead, this introduces a separate LongTermAuthorizationSSO purpose: the cookie is opt-in via the existing "Remember me" checkbox, and when presented without a session, autoSignIn redirects through the IdP with OIDC prompt=none for silent re-auth. On login_required / interaction_required / consent_required / account_selection_required
we transparently fall back to interactive sign-in.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/12321
Reviewed-by: Mathieu Fenniak <mfenniak@noreply.codeberg.org>
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2026-05-15 02:31:20 +02:00
..
assert_interface_test.go chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
init.go chore: unify signing key configuration across modules (#11194) 2026-04-21 19:39:33 +02:00
providers.go chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
providers_base.go chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
providers_custom.go chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
providers_openid.go chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
providers_simple.go chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
source.go feat: allow sync quota groups with oauth2 auth source (#8554) 2025-12-01 14:12:00 +01:00
source_authenticate.go chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
source_callout.go feat: persist OAuth2/OIDC sign-in via IdP re-validation (#12321) 2026-05-15 02:31:20 +02:00
source_name.go Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
source_register.go Handle OpenID discovery URL errors a little nicer when creating/editing sources (#23397) 2023-03-10 01:14:43 -05:00
store.go chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
token.go chore: Add JWT() method for convenience and clarity (#11067) 2026-02-07 01:01:30 +01:00
urlmapping.go chore: add modernizer linter (#11936) 2026-04-02 03:29:37 +02:00