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

[feature]: Backend auth support for Hoppscotch Desktop #3544

Open
1 task done
rokibulislaam opened this issue Nov 13, 2023 · 0 comments · May be fixed by #3561
Open
1 task done

[feature]: Backend auth support for Hoppscotch Desktop #3544

rokibulislaam opened this issue Nov 13, 2023 · 0 comments · May be fixed by #3561
Labels
desktop feature New feature or request

Comments

@rokibulislaam
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Summary

I noticed that the desktop code was pushed a few days ago. I attempted to run it, but it appears that the backend implementation has not been pushed yet.

await listen('scheme-request-received', async (event: any) => {
let deep_link = event.payload as string;
const params = new URLSearchParams(deep_link.split('?')[1]);
const accessToken = params.get('access_token');
const refreshToken = params.get('refresh_token');
const token = params.get('token');
function isNotNullOrUndefined(x: any) {
return x !== null && x !== undefined;
}
if (isNotNullOrUndefined(accessToken) && isNotNullOrUndefined(refreshToken)) {
const store = new Store(APP_DATA_PATH)
await store.set("access_token", { value: accessToken });
await store.set("refresh_token", { value: refreshToken } );
await store.save()
window.location.href = "/"
return;
}
if (isNotNullOrUndefined(token)) {
setLocalConfig("verifyToken", token)
await this.signInWithEmailLink("", "")
await setInitialUser()
}
});

The released desktop app seems to be using Firebase. I'm curious about the backend implementation for the authentication part. Additionally, I'm interested in the frontend, specifically the process of injecting or intercepting requests to inject cookies that have been stored on Tauri's store. (https://github.com/hoppscotch/releases/releases/tag/v23.8.3-1)

Is there a plan to push these implementations soon? I'm not entirely sure how you have planned to achieve this, but I would be interested in contributing if the codes for the backend part and cookie injection could be pushed.

Thanks!

Best,
Rokibul

Why should this be worked on?

It appears that the most recent release (2023.8.3) may not be fully complete. Specifically, I noticed potential gaps in the handling of authentication in the backend and the injection of access_token into the header of each outgoing request from the Desktop App.

@rokibulislaam rokibulislaam added the feature New feature or request label Nov 13, 2023
@rokibulislaam rokibulislaam linked a pull request Nov 16, 2023 that will close this issue
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
desktop feature New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants