fix
This commit is contained in:
parent
135df93d49
commit
eafb53bc4a
1 changed files with 2 additions and 2 deletions
|
@ -60,11 +60,11 @@
|
|||
const userLogin = document.querySelector('input[name="user_login"]').value;
|
||||
const clientSecret = document.querySelector('input[name="client_secret"]').value;
|
||||
const backRedirectionAddress = new URLSearchParams(window.location.search).get('back_redirection_address');
|
||||
fetch('http://auth-server/login?user_login=${userLogin}&client_secret=${clientSecret}')
|
||||
fetch(`http://auth-server/login?user_login=${userLogin}&client_secret=${clientSecret}`)
|
||||
.then(response => response.json())
|
||||
.then(data => {
|
||||
const accessToken = data.access_token;
|
||||
window.location.href = '${backRedirectionAddress}?access_token=${accessToken}&user_login=${userLogin}';
|
||||
window.location.href = `${backRedirectionAddress}?access_token=${accessToken}&user_login=${userLogin}`;
|
||||
})
|
||||
.catch(error => console.error(error));
|
||||
});
|
||||
|
|
Loading…
Add table
Reference in a new issue