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

Add examples for Tauri and Electron authentication flows #150

Open
jorgedanisc opened this issue Jan 13, 2025 · 1 comment
Open

Add examples for Tauri and Electron authentication flows #150

jorgedanisc opened this issue Jan 13, 2025 · 1 comment

Comments

@jorgedanisc
Copy link

Would be pretty cool to have examples showcasing authentication implementation in both Tauri and Electron for developing Native apps with React. Or even React Native, though I am not too familiar with it.

Key differences to highlight:

Tauri: Employs a custom protocol with deep linking and a straightforward API. It can also be integrated with a Vite application.
Electron: Similarly handles authentication via deep linking, typically using custom protocol handlers for OAuth flows (if I'm not mistaken).

I'm opening this issue as a suggestion. I understand there's ongoing development, is just that I never saw an auth project tackle this aspect (with native).

@jorgedanisc
Copy link
Author

I managed to get a minimal setup on Tauri + Vite by using these:

Deeplinking

To allow redirect from the Auth Server to your app
https://v2.tauri.app/plugin/deep-linking/

Http plugin to execute the fetch

Will be useful to call (on a SPA setup) to your backend to get the user data without CORS bugging you
https://v2.tauri.app/plugin/http-client/


Don't forget to add your custom protocol to the allow method on the OpenAuth issuer

For macOS you need to install your app to test

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

No branches or pull requests

1 participant