-
-
Notifications
You must be signed in to change notification settings - Fork 22
Open
Description
When configuring SSO providers in Gitea Mirror, the offline_access
scope causes authentication failures with certain providers that don't support this OpenID Connect standard scope.
Affected Providers
- Google OAuth - Returns error:
Error 400: invalid_scope
with message:Access blocked: authorisation error Some requested scopes were invalid. {valid=[openid, https://www.googleapis.com/auth/userinfo.email, https://www.googleapis.com/auth/userinfo.profile], invalid=[offline_access]}
Current Behavior
- The application allows users to select
offline_access
scope for all providers - A warning message is displayed when Google is detected as the issuer
- Users must manually deselect
offline_access
for incompatible providers
Expected Behavior
Users should be aware of which providers support offline_access
scope to avoid authentication errors.
Workaround
When configuring Google OAuth or other providers that don't support offline_access
:
Supported
Common SSO providers that support the offline_access scope:
- Microsoft/Azure AD - Supports offline_access for refresh tokens
- Auth0 - Supports offline_access
- Okta - Supports offline_access
- Keycloak - Supports offline_access
- AWS Cognito - Supports offline_access
- Ping Identity - Supports offline_access
- OneLogin - Supports offline_access
- Salesforce - Supports offline_access (as refresh_token)
Providers that don't support offline_access:
- Google - Uses access_type=offline parameter instead
- GitHub - No offline_access scope
- GitLab - Uses different mechanism for refresh tokens
The offline_access scope is part of the OpenID Connect specification for requesting refresh tokens, allowing applications to obtain new access tokens without user interaction.
Better-Auth Ref Issue: better-auth/better-auth#2360
Metadata
Metadata
Assignees
Labels
No labels