mirror of
https://github.com/versia-pub/server.git
synced 2025-12-06 16:38:19 +01:00
fix(api): 🐛 Also encode OAuth authorize endpoint response
This commit is contained in:
parent
ac906acbe2
commit
bfd4c7884e
|
|
@ -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.
|
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/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
|
## Get Frontend Configuration
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -303,7 +303,7 @@ export default (plugin: PluginType) =>
|
||||||
redirectUri.searchParams.append("code", code);
|
redirectUri.searchParams.append("code", code);
|
||||||
state && redirectUri.searchParams.append("state", state);
|
state && redirectUri.searchParams.append("state", state);
|
||||||
|
|
||||||
return context.redirect(redirectUri.toString());
|
return context.redirect(encodeURI(redirectUri.toString()));
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue