aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2018-06-18 10:35:18 +0300
committerGravatar Vitaly Takmazov2023-01-13 10:37:52 +0300
commitc41644ea950ed689cf27a3db98b3707bda7bfc0d (patch)
tree32db36d5a2fac306c5577cd8c65d352d7431fccc
parentc71ce524e60cb6a7ddfbb8ca1338a7ef0ffa4a2c (diff)
fix login with non-ascii credentials
-rw-r--r--vnext/src/components/LoginButton.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/vnext/src/components/LoginButton.js b/vnext/src/components/LoginButton.js
index 2016e853..6f698e16 100644
--- a/vnext/src/components/LoginButton.js
+++ b/vnext/src/components/LoginButton.js
@@ -33,7 +33,7 @@ export default class LoginButton extends React.Component {
login(event) {
event.preventDefault();
let headers = new Headers();
- headers.append('Authorization', 'Basic ' + window.btoa(this.state.username + ":" + this.state.password));
+ headers.append('Authorization', 'Basic ' + window.btoa(unescape(encodeURIComponent(this.state.username + ":" + this.state.password))));
fetch('https://api.juick.com/auth', {
method: 'GET',
credentials: 'omit',