hoppscotch / hoppscotch

Open source API development ecosystem - https://hoppscotch.io (open-source alternative to Postman, Insomnia)

Home Page:https://hoppscotch.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[bug]: Generate Oauth2 Token on Collection does not store token

ralphje opened this issue · comments

Is there an existing issue for this?

  • I have searched the existing issues

Current behavior

When changing the authorization properties on a collection, going through the 'Generate Token' button for OAuth 2.0 requests, prevents proper saving the generated token.

Steps to reproduce

  1. Create a Collection with at least one request under it
  2. Go to the Collection Properties and go to the Authorization tab
  3. Select OAuth 2.0 and fill in some values. I have tried this with the Authorization Code flow
  4. Click 'Generate Token'. Get redirected to the OAuth provider.
  5. Observe that the Token has been filled in at the top of the Authorization tab
  6. Click Save
  7. Try to make a request and observe that the Bearer token in the Authorization header is empty.
  8. Re-open the Authorization tab of the Collection Properties and observe it is empty (or the original value before clicking 'Generate Token'.

Environment

Production

Version

Cloud

commented

Same problem in latest self-hosted AIO version

commented

More details:

I have a Collection that has the OAuth2.0 properties:

  • It does not save the token if using OAuth2.0 Authorization Code Grant with PKCE
  • It saves if I use Password Grant
  • Either way a request that is inside a sub-collection inheriting the top-level Collection authorization won't put the token in the header