More permissive redirect uris

This commit is contained in:
Pierre HUBERT 2022-04-15 17:27:53 +02:00
parent 819210ae86
commit e0016b8305

View File

@ -93,7 +93,7 @@ pub async fn authorize(user: CurrentUser, id: Identity, query: web::Query<Author
};
let redirect_uri = query.redirect_uri.trim().to_string();
if client.redirect_uri != redirect_uri {
if !redirect_uri.starts_with(&client.redirect_uri) {
return HttpResponse::BadRequest().body(FatalErrorPage {
message: "Redirect URI is invalid!"
}.render().unwrap());