Skip to content

Commit

Permalink
Fix broken redirect helper case for data requests
Browse files Browse the repository at this point in the history
  • Loading branch information
paulomarg committed Aug 17, 2023
1 parent 57992c2 commit 8ae5ff3
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -68,14 +68,15 @@ function isBounceRequest(request: Request) {
function isDataRequest(request: Request) {
const {searchParams} = new URL(request.url);

const isGet = request.method === 'GET';
const sessionTokenHeader = Boolean(getSessionTokenHeader(request));
const sessionTokenSearchParam = searchParams.has('id_token');

return (
sessionTokenHeader &&
!sessionTokenSearchParam &&
!isBounceRequest(request) &&
!isEmbeddedRequest(request)
(!isEmbeddedRequest(request) || !isGet)
);
}

Expand Down

0 comments on commit 8ae5ff3

Please sign in to comment.