mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-06-21 22:31:46 +00:00
fix(mcp): replace relative oauth constent redirect by absolute redirect derived from APP_URL (#987)
This commit is contained in:
@@ -147,7 +147,8 @@ export const trekOAuthProvider: OAuthServerProvider = {
|
|||||||
if (params.state) qs.set('state', params.state);
|
if (params.state) qs.set('state', params.state);
|
||||||
if (params.resource) qs.set('resource', params.resource.href);
|
if (params.resource) qs.set('resource', params.resource.href);
|
||||||
|
|
||||||
res.redirect(302, `/oauth/consent?${qs.toString()}`);
|
const base = getMcpSafeUrl().replace(/\/+$/, '');
|
||||||
|
res.redirect(302, `${base}/oauth/consent?${qs.toString()}`);
|
||||||
},
|
},
|
||||||
|
|
||||||
// Not called because skipLocalPkceValidation = true.
|
// Not called because skipLocalPkceValidation = true.
|
||||||
|
|||||||
Reference in New Issue
Block a user