Unverified Commit 7739c995 authored by Haelwenn's avatar Haelwenn

qml/pages/LoginPage.qml: Fix URL parsing to get the Authentification code

parent 44495cb3
......@@ -144,7 +144,12 @@ Page {
(url+"").substr(0, 38) === 'https://localhost/harbour-tooter?code='
) {
visible = false;
var authCode = (url+"").substr(-64)
var vars = {};
(url+"").replace(/[?&]+([^=&]+)=([^&]*)/gi, function(m,key,value) { vars[key] = value;}); /* found on https://html-online.com/articles/get-url-parameters-javascript/ */
var authCode = vars["code"];
console.log(authCode)
Logic.api.getAccessTokenFromAuthCode(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment