Skip to content

Commit

Permalink
fix(authentication-service): fix uri encodin issue for redirection
Browse files Browse the repository at this point in the history
RD-0
  • Loading branch information
samarpan-b committed Nov 4, 2020
1 parent b06ec80 commit 6656a5e
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,9 @@ export class LoginController {
issuer: process.env.JWT_ISSUER,
});
response.redirect(
`${client.redirectUrl}?code=${token}&username=${this.user.username}`,
`${client.redirectUrl}?code=${token}&username=${encodeURI(
this.user.username,
)}`,
);
} catch (error) {
this.logger.error(error);
Expand Down Expand Up @@ -529,7 +531,9 @@ export class LoginController {
issuer: process.env.JWT_ISSUER,
});
response.redirect(
`${client.redirectUrl}?code=${token}&user=${this.user.username}`,
`${client.redirectUrl}?code=${token}&user=${encodeURI(
this.user.username,
)}`,
);
} catch (error) {
this.logger.error(error);
Expand Down

0 comments on commit 6656a5e

Please sign in to comment.