From c41644ea950ed689cf27a3db98b3707bda7bfc0d Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Mon, 18 Jun 2018 10:35:18 +0300 Subject: fix login with non-ascii credentials --- vnext/src/components/LoginButton.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'vnext') 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', -- cgit v1.2.3