[PR #3561] [CLOSED] Feat/selfhosted desktop backend auth #4434

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

📋 Pull Request Information

Original PR: https://github.com/hoppscotch/hoppscotch/pull/3561
Author: @rokibulislaam
Created: 11/16/2023
Status: Closed

Base: mainHead: feat/selfhosted-desktop-backend-auth


📝 Commits (5)

  • 513403c feat(backend): add desktop auth deeplink callback
  • 4fc29d3 fix(desktop): fix invalid csp value 'nil' in tauri.conf.json
  • 7650b37 feat(desktop): add urql fetch & subscription exchanges w/ cookie support
  • 189fae2 fix(backend): remove test cookie from callback
  • 9b20994 Delete packages/hoppscotch-common/src/components.d.ts

📊 Changes

13 files changed (+542 additions, -292 deletions)

View changed files

📝 .env.example (+1 -0)
📝 packages/hoppscotch-backend/src/auth/auth.controller.ts (+11 -6)
📝 packages/hoppscotch-backend/src/auth/helper.ts (+12 -0)
packages/hoppscotch-common/src/components.d.ts (+0 -222)
📝 packages/hoppscotch-selfhost-desktop/package.json (+6 -0)
📝 packages/hoppscotch-selfhost-desktop/src-tauri/Cargo.lock (+69 -1)
📝 packages/hoppscotch-selfhost-desktop/src-tauri/Cargo.toml (+1 -0)
📝 packages/hoppscotch-selfhost-desktop/src-tauri/src/main.rs (+1 -0)
📝 packages/hoppscotch-selfhost-desktop/src-tauri/tauri.conf.json (+1 -1)
packages/hoppscotch-selfhost-desktop/src/helpers/GQLClient.ts (+168 -0)
packages/hoppscotch-selfhost-desktop/src/helpers/wsWrapper.ts (+154 -0)
📝 packages/hoppscotch-selfhost-desktop/src/platform/auth.ts (+80 -48)
📝 pnpm-lock.yaml (+38 -14)

📄 Description

Closes #3544

Description

Checks

  • My pull request adheres to the code style of this project
  • My code requires changes to the documentation
  • I have updated the documentation as required
  • All the tests have passed

Additional Information

Dependencies Added

Desktop - package.json
Desktop - Cargo.toml

Enivonrment Variables Added

  • DESKTOP_DEEP_LINK_URL

PR Features

  • Implemented a custom fetch urql exchange to utilize taur's HTTP client, injecting access_token and refresh_token into the cookie from tauri's store.
  • Created a WebSocket wrapper using tauri-plugin-websocket-api, enabling support for subscriptions-transport-ws while injecting cookies from tauri's store.

🔄 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/3561 **Author:** [@rokibulislaam](https://github.com/rokibulislaam) **Created:** 11/16/2023 **Status:** ❌ Closed **Base:** `main` ← **Head:** `feat/selfhosted-desktop-backend-auth` --- ### 📝 Commits (5) - [`513403c`](https://github.com/hoppscotch/hoppscotch/commit/513403ce6ce5d7fa51d9802c911edfa8a5c933c0) feat(backend): add desktop auth deeplink callback - [`4fc29d3`](https://github.com/hoppscotch/hoppscotch/commit/4fc29d3f7b77c2178ee6ceba99db69d5781d9722) fix(desktop): fix invalid csp value 'nil' in tauri.conf.json - [`7650b37`](https://github.com/hoppscotch/hoppscotch/commit/7650b3792f00fe615220cf9b5afdfff8759b83db) feat(desktop): add urql fetch & subscription exchanges w/ cookie support - [`189fae2`](https://github.com/hoppscotch/hoppscotch/commit/189fae236d9d1ab598baee53b08562213d1a9c69) fix(backend): remove test cookie from callback - [`9b20994`](https://github.com/hoppscotch/hoppscotch/commit/9b2099448b8c91173709396ef5be54045e0fb388) Delete packages/hoppscotch-common/src/components.d.ts ### 📊 Changes **13 files changed** (+542 additions, -292 deletions) <details> <summary>View changed files</summary> 📝 `.env.example` (+1 -0) 📝 `packages/hoppscotch-backend/src/auth/auth.controller.ts` (+11 -6) 📝 `packages/hoppscotch-backend/src/auth/helper.ts` (+12 -0) ➖ `packages/hoppscotch-common/src/components.d.ts` (+0 -222) 📝 `packages/hoppscotch-selfhost-desktop/package.json` (+6 -0) 📝 `packages/hoppscotch-selfhost-desktop/src-tauri/Cargo.lock` (+69 -1) 📝 `packages/hoppscotch-selfhost-desktop/src-tauri/Cargo.toml` (+1 -0) 📝 `packages/hoppscotch-selfhost-desktop/src-tauri/src/main.rs` (+1 -0) 📝 `packages/hoppscotch-selfhost-desktop/src-tauri/tauri.conf.json` (+1 -1) ➕ `packages/hoppscotch-selfhost-desktop/src/helpers/GQLClient.ts` (+168 -0) ➕ `packages/hoppscotch-selfhost-desktop/src/helpers/wsWrapper.ts` (+154 -0) 📝 `packages/hoppscotch-selfhost-desktop/src/platform/auth.ts` (+80 -48) 📝 `pnpm-lock.yaml` (+38 -14) </details> ### 📄 Description <!-- Thanks for creating this pull request 🤗 Please make sure that the pull request is limited to one type (docs, feature, etc.) and keep it as small as possible. You can open multiple prs instead of opening a huge one. --> <!-- If this pull request closes an issue, please mention the issue number below --> Closes #3544 ### Description <!-- Add a brief description of the pull request --> <!-- You can also choose to add a list of changes and if they have been completed or not by using the markdown to-do list syntax - [ ] Not Completed - [x] Completed --> ### Checks <!-- Make sure your pull request passes the CI checks and do check the following fields as needed - --> - [x] My pull request adheres to the code style of this project - [ ] My code requires changes to the documentation - [ ] I have updated the documentation as required - [x] All the tests have passed ### Additional Information <!-- Any additional information like breaking changes, dependencies added, screenshots, comparisons between new and old behaviour, etc. --> #### Dependencies Added ##### Desktop - package.json - [@urql/core](https://www.npmjs.com/package/@urql/core) - [tauri-plugin-websocket-api](https://github.com/tauri-apps/tauri-plugin-websocket) - [subscriptions-transport-ws](https://www.npmjs.com/package/subscriptions-transport-ws) - [cookie](https://www.npmjs.com/package/cookie) ##### Desktop - Cargo.toml - [tauri-plugin-websocket-api](https://github.com/tauri-apps/tauri-plugin-websocket) #### Enivonrment Variables Added - DESKTOP_DEEP_LINK_URL #### PR Features - Implemented a custom fetch urql exchange to utilize taur's HTTP client, injecting `access_token` and `refresh_token` into the cookie from tauri's store. - Created a WebSocket wrapper using `tauri-plugin-websocket-api`, enabling support for `subscriptions-transport-ws` while injecting cookies from tauri's store. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-17 01:58:13 +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#4434
No description provided.