fix(api): 🐛 Also encode OAuth authorize endpoint response

This commit is contained in:
Jesse Wierzbinski 2024-09-04 23:21:52 +02:00
parent ac906acbe2
commit bfd4c7884e
No known key found for this signature in database
2 changed files with 2 additions and 2 deletions

View file

@ -7,7 +7,7 @@ The frontend API contains endpoints that are useful for frontend developers. The
These routes can be set to a different URL in the Versia Server configuration, at `frontend.routes`. The frontend must implement these routes for the instance to function correctly.
- `GET /oauth/authorize`: (NOT `POST`): Identifier/password login form, submits to [`POST /api/auth/login`](#sign-in) or OpenID Connect flow.
- `GET /oauth/consent`: Consent form, submits to [`POST /api/auth/redirect`](#consent)
- `GET /oauth/consent`: Consent form, submits to [`POST /oauth/authorize`](#consent)
## Get Frontend Configuration

View file

@ -303,7 +303,7 @@ export default (plugin: PluginType) =>
redirectUri.searchParams.append("code", code);
state && redirectUri.searchParams.append("state", state);
return context.redirect(redirectUri.toString());
return context.redirect(encodeURI(redirectUri.toString()));
},
),
);