Skip to content

Commit

Permalink
fix(api): Incorrect oauth redirect url
Browse files Browse the repository at this point in the history
  • Loading branch information
rajdip-b committed Nov 27, 2024
1 parent 126d024 commit 58d96e5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions apps/api/src/common/redirect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@ const platformOAuthFailureRedirectUrl = `${platformFrontendUrl}${platformOAuthFa
export function sendOAuthFailureRedirect(response: Response, reason: string) {
response
.status(302)
.redirect(`${platformOAuthSuccessRedirectUrl}?reason=${reason}`)
.redirect(`${platformOAuthFailureRedirectUrl}?reason=${reason}`)
}

/* istanbul ignore next */
export function sendOAuthSuccessRedirect(response: Response, user: User) {
response
.status(302)
.redirect(
`${platformOAuthFailureRedirectUrl}?data=${encodeURIComponent(
`${platformOAuthSuccessRedirectUrl}?data=${encodeURIComponent(
JSON.stringify(user)
)}`
)
Expand Down

0 comments on commit 58d96e5

Please sign in to comment.