Developer builds cross-PWA login handoff using browser-native HMAC-SHA256, no backend needed
A developer built a backend-free identity-passing system between two separate Progressive Web Apps running on different Firebase projects. The solution uses the browser's built-in Web Crypto API to generate an HMAC-SHA256 signed token embedded in a URL query parameter. When an operator clicks the Onboarding button, the sender app signs a payload containing the user's name, department, and timestamp with a shared secret, then opens the destination app with the token appended. The receiving app independently recomputes the signature and rejects the token if it doesn't match or is older than five minutes. Because both apps are internal tools, storing the shared secret on the client side was deemed an acceptable security trade-off.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in