-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pass and preserve a path parameter during the app authentication #13832
Conversation
The webassets submodule update isnt in yet because I want to get feedback on this before I merge the web one just in case this solution doesn't work out. Will push the webassets update before this is merged in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it be feasible to add a test for this?
Most of the meaningful logic is in the client side js returned so I don't really know if we can/should test that, but I did add a test to the app access logic to ensure any expected paths are added in the |
5a97047
to
317fbab
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks for addressing all of my comments
b4f5ad8
to
944c534
Compare
944c534
to
8bc3ae2
Compare
) * pass and preserve a path parameter during the app access authentication process * added missing semicolons * more javascript formatting * removed incorrect path redirect. replace URL with URL.Path * added a test for HasName * added another test for default path * ensure path param is valid path * build url without string concat
…#13… (#14205) pass and preserve a path parameter during the app authentication (#13832) * pass and preserve a path parameter during the app access authentication process * added missing semicolons * more javascript formatting * removed incorrect path redirect. replace URL with URL.Path * added a test for HasName * added another test for default path * ensure path param is valid path * build url without string concat
I left some detailed info in the webapps PR with some reproduction steps
This would add the requested path as a parameter to the redirect_uri during app access, which would only exist from a bookmarked or shared link since our dashboard links to root anyway. This is where the problem arises, when a path is included in a request but the user is unauthenticated, the requested path is lost during the (many) redirects that happen during the authentication process.
Including this query parameter in the final javascript code in the redirection service will keep the path preserved.
Also, cleaned up the state value params to not be hard coded to retrieve from a specific index and instead uses standard getters with URLSearchParams