thunderclient / thunder-client-support

Thunder Client is a lightweight Rest API Client Extension for VS Code.
https://www.thunderclient.com
Other
3.64k stars 132 forks source link

bearer tokens not working with 2.25.3 #1605

Closed dviljoenddn closed 2 months ago

dviljoenddn commented 2 months ago

Describe the bug I upgraded to 2.25.3 and my bearer token stopped working. I downgraded to v3.25.1 and they started working again. I did not check 2.25.2.

To Reproduce I'm using a var for my token {{token}}

Expected behavior It authenticates correctly.

Platform:

Are you using the free version/paid version/trial: Free version.

dviljoenddn commented 2 months ago

I don't know if this feature exists or not, but it would be helpful to see the raw request/response to help diagnose the issue better for you. I'd like to know what is being sent over the wire to give you more detail about the bug. I'd use wireshark, but this is happening on a remote system (remote debugging).

rangav commented 2 months ago

@dviljoenddn I have tested it now, and it seems to work for me.

Can you verify the headers in the logs https://docs.thunderclient.com/features/logs

dviljoenddn commented 2 months ago

Its not showing me the contents of the variable, but it's sending:

WARNING: The Global or Local Environment feature is available only in the paid version. 
Request Url: https://dvred1/redapi/v1/clusters/red01
Method: GET
Request Headers:
{
  "accept-encoding": "gzip, deflate, br",
  "Accept": "*/*",
  "User-Agent": "Thunder Client (https://www.thunderclient.com)",
  "Authorization": "Bearer {{token}}"
}
dviljoenddn commented 2 months ago

If I downgrade, I get:

---------------- Running Request: ----------------
Request Url: https://dvred1/redapi/v1/clusters/red01
Method: GET
Request Headers:
{
  "accept-encoding": "gzip, deflate, br",
  "Accept": "*/*",
  "User-Agent": "Thunder Client (https://www.thunderclient.com)",
  "Authorization": "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3MjY1NTgzNjUsImlhdCI6MTcyNjQ5ODM2NSwiaXNzIjoiU2VydmljZSIsInN1YiI6InJlYWxtX2FkbWluIiwic24iOiIiLCJzY29wZSI6InJlYWxtIiwidXVpZCI6IjljZWNjZDFhLTllNTktNGVmNS05YzgwLWNhYjRjYjE3ZWU5ZiIsImNhcHMiOiI6YWRtaW4scmVkMDEvcmVkOmFkbWluLHJlZDAxL3JlZC9yZWQ6YWRtaW4scmVkMDEvcmVkL3JlZC9yZWRvYmo6YWRtaW4iLCJsZXZlbCI6IiIsImhhc2giOiJmYmJmMzJjN2U2ZTc5OTc4YTJkODM4Mzg0ZjBhZDBlMmM3Y2NiMGVhNzNmMTU0OTRkN2JhZTI4MmRlYjVjNTc5IiwidGlkIjoxLCJzaWQiOjEsInVpZCI6MjAwMDEsImdpZCI6MH0.epmIHTinVQgQFlnZCHkPx8EdI1Ht1rdRmwAwlZMLpiw"
}
dviljoenddn commented 2 months ago

So, did you remove the env var from the free version? Is that why it stopped working?

dviljoenddn commented 2 months ago

Which is odd, because my hostname (dvred1) is filled in through an env var. So it's not entirely broken.

rangav commented 2 months ago

Ok Thanks for sharing logs, may be an installation issue.

No we haven't removed env var in the free version.

Try re-installing the latest version again.

dviljoenddn commented 2 months ago

I just did, that's how I reproduced the issue. I've been downgraded to 2.25.1 since I first hit it.

dviljoenddn commented 2 months ago

I don't know if it matters, but I'm running on Windows, but vscode is remotely working on a linux VM.

rangav commented 2 months ago

I am closing this issue.

dviljoenddn commented 2 months ago

But it still doesn't work. Does this mean I can't use vars for bearer tokens anymore going forward? Is this a feature? Will it be documented? What's up with this?

rangav commented 2 months ago

Its working for me. I cant reproduce the error.

dviljoenddn commented 2 months ago

Well, thanks for your help. Guess I'm going back to postman.

rangav commented 2 months ago

Did you test with latest version v2.25.6?

dviljoenddn commented 2 months ago

Yes. The problem was introduced between v2.25.2 and v2.25.3. It works with v2.25.2. It does not work v2.25.3 and all releases after it. I suspect there's a problem with the licensing. I don't get an error about vars being available only with paid version on the working versions.

rangav commented 2 months ago

Are you available for quick zoom call to look into it?

dviljoenddn commented 2 months ago

Sorry I can't.

rangav commented 2 months ago

Then there is nothing else we can do.