Álvaro P.
WWasp-lang
•Created by Álvaro P. on 3/29/2024 in #🙋questions
Best Practices for Implementing Auth System in Chrome Extension Connected to OpenSaaS
Hello, everyone! I'm currently developing a SaaS product and have created a Chrome extension. I'm at the stage where I need to implement an authentication system that connects the Chrome extension with our SaaS backend, which I've referred to as OpenSaaS for this example.
The primary goal is to securely authenticate users through the Chrome extension, ensuring that only authorized users can access and use the extension's features. Here's what I have in mind for the authentication flow:
- Users click on the extension icon and are prompted to log in through a popup if they aren't already authenticated.
- Upon logging in, the credentials are sent to OpenSaaS's authentication API.
- The API returns a token upon successful authentication, which the extension then stores securely.
- This token is used for subsequent API calls to authenticate the user.
I'm looking for advice on the following:
- Secure Token Storage: What are the best practices for securely storing and managing the authentication token within a Chrome extension?
- Authentication Flow: Is there a recommended pattern or best practice for implementing the authentication flow in a Chrome extension, especially concerning SaaS products?
- API Communication: Any tips on securing the communication between the Chrome extension and the SaaS backend?
Additionally, if there are any security considerations or common pitfalls I should be aware of, I'd greatly appreciate your insights.
Thank you in advance for your help and guidance!
42 replies