[PR #3531] [MERGED] fix: Oauth 2.0 authentication type is breaking #4422

Closed
opened 2026-03-17 01:57:40 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/hoppscotch/hoppscotch/pull/3531
Author: @amk-dev
Created: 11/10/2023
Status: Merged
Merged: 11/13/2023
Merged by: @AndrewBastin

Base: release/2023.8.4Head: feat/oauth-revamp


📝 Commits (2)

  • 514fb3c chore: rename oauth.js to oauth.ts
  • cffcac8 fix: oauth basic improvements

📊 Changes

6 files changed (+186 additions, -94 deletions)

View changed files

📝 packages/hoppscotch-common/package.json (+1 -1)
📝 packages/hoppscotch-common/src/components/http/OAuth2Authorization.vue (+6 -1)
📝 packages/hoppscotch-common/src/helpers/oauth.ts (+124 -56)
📝 packages/hoppscotch-common/src/pages/index.vue (+1 -25)
packages/hoppscotch-common/src/pages/oauth.vue (+43 -0)
📝 pnpm-lock.yaml (+11 -11)

📄 Description

Before

Currently authentication type Oauth is breaking when trying to generate token. The breakage is caused by an incorrect destructuring we do when extracting info from OIDC discovery URL.

After

Added necessery validations when parsing OIDC discovery URL content.

Since we haven't touched the oauth code in a long time. I've done some quick improvements to the code.

  • basic migration of oauth.js to typescript
  • move the oauth redirect uri handling logic from index.vue to a seperate page oauth.vue
  • use zod validations & improve error handling

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/hoppscotch/hoppscotch/pull/3531 **Author:** [@amk-dev](https://github.com/amk-dev) **Created:** 11/10/2023 **Status:** ✅ Merged **Merged:** 11/13/2023 **Merged by:** [@AndrewBastin](https://github.com/AndrewBastin) **Base:** `release/2023.8.4` ← **Head:** `feat/oauth-revamp` --- ### 📝 Commits (2) - [`514fb3c`](https://github.com/hoppscotch/hoppscotch/commit/514fb3cef01a64cce83f6f70854de6f884feb268) chore: rename oauth.js to oauth.ts - [`cffcac8`](https://github.com/hoppscotch/hoppscotch/commit/cffcac8f6bb1a56add35d453491603554f2b71b0) fix: oauth basic improvements ### 📊 Changes **6 files changed** (+186 additions, -94 deletions) <details> <summary>View changed files</summary> 📝 `packages/hoppscotch-common/package.json` (+1 -1) 📝 `packages/hoppscotch-common/src/components/http/OAuth2Authorization.vue` (+6 -1) 📝 `packages/hoppscotch-common/src/helpers/oauth.ts` (+124 -56) 📝 `packages/hoppscotch-common/src/pages/index.vue` (+1 -25) ➕ `packages/hoppscotch-common/src/pages/oauth.vue` (+43 -0) 📝 `pnpm-lock.yaml` (+11 -11) </details> ### 📄 Description **Before** Currently authentication type Oauth is breaking when trying to generate token. The breakage is caused by an incorrect destructuring we do when extracting info from OIDC discovery URL. **After** Added necessery validations when parsing OIDC discovery URL content. Since we haven't touched the oauth code in a long time. I've done some quick improvements to the code. * basic migration of `oauth.js` to typescript * move the oauth redirect uri handling logic from `index.vue` to a seperate page `oauth.vue` * use zod validations & improve error handling --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-17 01:57:40 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/hoppscotch#4422
No description provided.