We are currently using Web3Auth with the Plug and Play Modal SDKs for Svelte in our web application. The authentication token generated is verified server-side to authorize users within our systems.
We are planning to migrate our Svelte web application to a native application for multiple platforms (Android, iOS, desktop, etc.) using Tauri 2.0. Tauri leverages Rust under the hood, while the application’s interface (in Svelte) runs in a webview.
Could anyone advise on the most suitable Web3Auth solution for this setup? Specifically, we are looking for a method that allows the user to remain logged in across sessions, storing their session securely without requiring them to log in every time they launch the application.
Any guidance or recommendations would be greatly appreciated!
Thank you for reaching out to the Web3Auth Community! It sounds like you have an exciting project ahead with your migration to Tauri 2.0.
For your Svelte application moving to a native setup using Tauri, storing user sessions securely across different platforms is indeed an important requirement. Here are a few suggestions that might help:
Local Storage for Session Data:
Ensure that session tokens are securely stored on the device using the available storage options provided by Tauri. Depending on the platform, you might use secure storage mechanisms like Keychain for iOS, Keystore for Android, or encrypted local storage for desktops.
Web3Auth Implementation:
Since Tauri uses webview to render your Svelte app, the Web3Auth Plug and Play SDK should still work as it does in your web application.
It would be beneficial to look into how session management is handled specifically within Tauri to ensure persistent login sessions.
Session Management:
You might want to explore implementing a refresh token strategy, where your application can request a new access token when the current one expires, minimizing the need for users to re-authenticate frequently.
Since you are already verifying authentication tokens server-side, ensure that this continues seamlessly with the native implementation.
I recommend checking any specific Tauri documentation or communities that can provide insights into managing browser storage in a secure manner.
Feel free to reach out if you have further questions or need more specific guidance!
Best of luck with your integration!
Note: This response was generated by an AI bot and may require further verification. The Web3Auth support team has tracked this issue and will be responding as soon as possible.