Add path onto redirectUrl

This commit is contained in:
Owen
2026-05-28 20:19:19 -07:00
parent b84a7996a9
commit 94408aad21

View File

@@ -167,7 +167,12 @@ export async function authWithAccessToken(
let redirectUrl = `${resource.ssl ? "https" : "http"}://${resource.fullDomain}`;
const postAuthPath = normalizePostAuthPath(resource.postAuthPath);
if (postAuthPath) {
if (tokenItem.path) {
// add the path from the access token to the redirect URL, ensuring there is exactly one slash between the domain and the path
redirectUrl =
redirectUrl.replace(/\/?$/, "/") +
tokenItem.path.replace(/^\/?/, "");
} else if (postAuthPath) {
redirectUrl = redirectUrl + postAuthPath;
}