diff --git a/Iceshrimp.Backend/Pages/OAuth/Authorize.cshtml.cs b/Iceshrimp.Backend/Pages/OAuth/Authorize.cshtml.cs index 7cba29b8..9e1ed4fc 100644 --- a/Iceshrimp.Backend/Pages/OAuth/Authorize.cshtml.cs +++ b/Iceshrimp.Backend/Pages/OAuth/Authorize.cshtml.cs @@ -27,7 +27,7 @@ public class AuthorizeModel(DatabaseContext db) : PageModel { public OauthToken? Token = null; public async Task OnGet() { - App = await db.OauthApps.FirstOrDefaultAsync(p => p.ClientId == ClientId) + App = await db.OauthApps.FirstOrDefaultAsync(p => p.ClientId == ClientId.Replace(' ', '+')) ?? throw GracefulException.BadRequest("Invalid client_id"); if (MastodonOauthHelpers.ExpandScopes(Scopes).Except(MastodonOauthHelpers.ExpandScopes(App.Scopes)).Any()) throw GracefulException.BadRequest("Cannot request more scopes than app");