Fix "Do not work in Firefox" bug
For firefox, optlink.search return empty string. Create a function to extract query string and pass to parseQuery function.
This commit is contained in:
parent
407521782c
commit
50bdd31ecd
|
@ -60,7 +60,10 @@
|
|||
var accountName;
|
||||
|
||||
otplink.href = otpauth;
|
||||
otp = parseQuery(otplink.search);
|
||||
|
||||
var idx = otplink.href.indexOf('?');
|
||||
var queryString = (idx >= 0 ? otplink.href.slice(idx) : '');
|
||||
otp = parseQuery(queryString);
|
||||
|
||||
meta = otplink.pathname.replace(/.*\/totp\//, '').split(':');
|
||||
// TODO throw if otp.issuer !== decodeURI(meta[0])
|
||||
|
|
Loading…
Reference in New Issue