mirror of
https://github.com/hoppscotch/hoppscotch.git
synced 2026-04-25 16:55:59 +03:00
[PR #3025] [MERGED] fix: returning response from authCookieHandler #4190
Labels
No labels
CodeDay
a11y
browser limited
bug
bug fix
cli
core
critical
design
desktop
discussion
docker
documentation
duplicate
enterprise
feature
feature
fosshack
future
good first issue
hacktoberfest
help wanted
i18n
invalid
major
minor
need information
need testing
not applicable to hoppscotch
not reproducible
pull-request
question
refactor
resolved
sandbox
self-host
spam
stale
testmu
wip
wont fix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/hoppscotch#4190
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/hoppscotch/hoppscotch/pull/3025
Author: @mirarifhasan
Created: 5/2/2023
Status: ✅ Merged
Merged: 5/9/2023
Merged by: @AndrewBastin
Base:
release/2023.4.2← Head:fix/cookie-handler📝 Commits (1)
156c341fix: re-returning response from authCookieHandler📊 Changes
1 file changed (+2 additions, -2 deletions)
View changed files
📝
packages/hoppscotch-backend/src/auth/helper.ts(+2 -2)📄 Description
Issue number
Fixes #3024
Close HBE-191
Description
Background Information of Issue
So, whenever the
{BASE_URL}/v1/auth/verifyAPI was called, theresponseobject was written with cookies. Afterward, the server sends a response to the client with conditional redirection. During sending the response, the backend service encounters the following error.Proposed Solution
In the backend service, there were two statements for sending a response to the client (under conditional statement).
In the first statement, there were missed
returnkeywords. For that reason, the response was sent to the client but further code execution is ongoing.In the following code execution, there was another statement for sending the response to the client. As previously the response already sent to the client, the following one encountered the error.
Simply I added the
returnkeyword to fix the issue.Checks
Additional Information
Nil
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.