invalid token response
JastinXyz opened this issue · 4 comments
I doubt if everyone is experiencing the same thing or not? i can't get valid token when using getToken function. The response from the function is always the raw response from the API (with some being truncated due to "substrings" in some variables) as shown below.
I think the issue is in the "end" variable
Line 55 in 292df7d
But I can fix it with the code below
const pos = text.search("Bearer IGT:2:");
const sliced = text.substring(pos);
const token = sliced.substring(13, sliced.search(/\\\*?/gm));
return token;
Do I need to open a new pull request or is there another way to fix this problem?
I have the same issue. I was wondering why nobody has encountered that. Would just do a PR and see what @elijah-wright thinks.
I doubt if everyone is experiencing the same thing or not? i can't get valid token when using getToken function. The response from the function is always the raw response from the API (with some being truncated due to "substrings" in some variables) as shown below.
I think the issue is in the "end" variable
Line 55 in 292df7d
But I can fix it with the code below
const pos = text.search("Bearer IGT:2:"); const sliced = text.substring(pos); const token = sliced.substring(13, sliced.search(/\\\*?/gm)); return token;Do I need to open a new pull request or is there another way to fix this problem?
Also tried your solution and it works for me.
I have the same issue. I was wondering why nobody has encountered that. Would just do a PR and see what @elijah-wright thinks.
ok I would open a new PR
Actually, I have a fixed parser, but I haven't finished implementing the 2FA method yet, so I will make a pull request with 2FA as soon as possible.