Custom widget implementation doesn't redirect correctly

Hello there,
Okay a bit of context first.
We previously used the Okta Signing Widget in our Single page web app, but we wanted to switch it to our own implementation because of the limitations with third-party cookies in the Okta provided widget.

Therefore we use webfinger to handle the SSO together with the “getWithRedirect” function, and we use the “signInWithCredentials” and then “getWithRedirect” to handle the regular username/password combination.

This works fine for dev and prod environments, but the issue that we have is that in our CI pipeline we have the possibility to create feature branches based on git branch names.
So a url could look something like: dev.ourdomain.com/awesome-feature-branch/home, but when i use our custom implementation it wont redirect to this url, it will only go to “/home”.
The Okta provided widget worked fine, and i’ve been trying to reverse engineer it by looking at the repo, and can’t seem to figure it out.
What is the magic here? :slight_smile:

Thanks in advance

//Brian

Hi @BrianTu, are you receiving any kind of an error when redirecting to /awesome-feature-branch/home ?

Hey, thank you for the response and sorry the delay in answering. I wanted to investigate if we were getting any errors, but as far as i can see there are no errors. That could be because it is redirecting, to another url and the error gets swallowed by that.
This is what happens now:

/awesome-feature-branch/auth/login the user logs in, the redirect to Okta happens and all looks good, but then it will redirect back to /auth/login, so without the feature branch name in it, just the regular dev environment, and it will not be authenticated.
So im suspecting that we’re somehow leaving out some information when we do the getWithRedirect?