Skip to content

Support for Custom URI Schemes in OAuth2 Redirect URIs for Mobile App Integration #34349

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
TwentyFiveSoftware opened this issue May 2, 2025 · 0 comments
Labels

Comments

@TwentyFiveSoftware
Copy link

Description

Hi,

I'm trying to use Gitea as an OAuth provider for a Flutter mobile app, but I ran into a problem when setting up an OAuth2 Application. I want to use a redirect URI with custom scheme like com.example.example_app://callback, as this is a standard way to handle OAuth callbacks in mobile apps (i.e. as recommended in the flutter_appauth package documentation).

Unfortunately, Gitea doesn't seem to allow redirect URIs unless they start with http/https. That makes it hard to use Gitea with mobile apps that rely on custom schemes to handle OAuth callbacks. Other major OAuth providers like GitHub and GitLab do allow custom schemes, so I was surprised this isn't permitted in Gitea.

I found some Gitea integration tests related to the redirect URI validation, so I’m wondering if this was an intentional decision? Or maybe just an oversight?

It would be great if Gitea could support custom URI schemes for the OAuth redirect URIs.

Gitea Version

1.25.0+dev-9-gcbb2e52911 (current Gitea demo site version)

Can you reproduce the bug on the Gitea demo site?

Yes

Log Gist

No response

Screenshots

No response

Git Version

No response

Operating System

No response

How are you running Gitea?

https://demo.gitea.com/

Database

None

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant