Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] auth Bearer Token not work #2502

Closed
1 task done
huan9yao opened this issue Apr 19, 2024 · 6 comments · Fixed by #2511
Closed
1 task done

[BUG] auth Bearer Token not work #2502

huan9yao opened this issue Apr 19, 2024 · 6 comments · Fixed by #2511
Labels

Comments

@huan9yao
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

6.4.2 version use Auth set Bearer token not work ,Not sent in request header,so when send request is wrong,no auth to request mutation or query
altair auth
but in version 6.4.1 is work,header has send Authorization
altair auth work

Expected Behavior

when use Auth Bearer Token will send token correctly

Steps To Reproduce

  1. in versoin 6.4.2 enter url ,use Auth Bearer Token,enter token
  2. send request or load docs
  3. see the devtool network

Environment

- OS:macOS 12.7.4
- Browser: Chrome 123.0.6312.123
- Platform: Chrome Extensions
- Version: 6.4.2

Additional context

No response

@imolorhe
Copy link
Collaborator

Hey I just checked and the authorization header is set correctly for me. Maybe there's another reason why it didn't work?

Can you try with a new window? Set the URL, set the authorization to bearer and set the bearer token.

@huan9yao
Copy link
Author

huan9yao commented Apr 19, 2024

I try to restart chrome, close other extensions expect Altair, open in new window, it didn't work; then I reinstall Altair extension , it also didn't work;I also try to install extension on Microsoft Edge,it didn't work too
When install version 6.4.1, all the settings are the same as version 6.4.2,it work.
It also has been tested on my colleague's computer as well, and it didn't work.

@imolorhe
Copy link
Collaborator

Doo you have exact steps you took so I can try to reproduce it?

@huan9yao
Copy link
Author

huan9yao commented Apr 22, 2024

steps:
1.open extensions Altair
2.click new window, open new window
3.choose "POST" method and enter URL,
4.click Auth, Auth type select "Bearer Token", and paste the generated token into the "Bearer token" input box
5.reload docs and open docs to see the schema
6.enter query and send request
when step5/6, open Devtools, set "network" the request header.
I capture screen, steps like below gif.

Apr-22-2024 15-22-33

@imolorhe
Copy link
Collaborator

Thanks! I have been able to reproduce the issue. I wasn't seeing it earlier because it only affects you when you don't have pre-request scripts enabled, which I did. Sorry for the trouble! I'll work on fixing this.

In the meantime, you can workaround it by simply enabling pre-request scripts (you don't need to add any script, just enabling it should be sufficient)

@imolorhe
Copy link
Collaborator

You can test the fix here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants