mirror of
https://github.com/fosrl/pangolin.git
synced 2026-06-05 15:26:35 +00:00
Add path onto redirectUrl
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user