Back to Webinars

Safeguarding OAuth Tokens: Protecting Your Digital Identity

Date Aired: May 28, 2025

What You’ll Learn

OAuth token storage determines how much damage an attacker can do after stealing a token. This webinar breaks down where access and refresh tokens should live across browser, server-side, and mobile applications, why local storage creates avoidable exposure, and when Secure, HttpOnly cookies or a backend-for-frontend architecture provide the better control.

Key Takeaways:

  • Access tokens and refresh tokens divide security responsibilities. Short-lived access tokens limit how long a stolen credential remains useful, while refresh tokens let the authorization server decide whether to issue another one. The right expiration window depends on the damage a compromised token could cause.
  • OAuth token storage should follow the application’s threat model. A coupon app and a banking app can use the same protocol without needing the same controls. Token value, lifetime, client type, and the consequences of theft should drive the architecture.
  • TLS protects tokens in transit, but only if the application keeps them out of places that routinely get recorded. Tokens should not appear in URLs, where browser history, proxies, analytics systems, and logs can preserve them. Use encrypted connections and send tokens in headers or request bodies instead.
  • Browser local storage gives every script running in the application a potential path to the token. That includes injected JavaScript, compromised packages, and dependencies added months after launch. Choosing local storage means extending trust to the entire JavaScript supply chain, including code the team may never review directly.
  • Domain boundaries determine when cookies stop being practical. Browsers will not freely send a cookie created for one unrelated domain to another, because that would be unsafe. Applications spanning multiple domains may need a backend-for-frontend (BFF) rather than attempts to work around the browser’s security model.
  • A BFF stores OAuth tokens in a server-side session and gives the browser a session cookie. The BFF can attach tokens to downstream requests, support APIs with different header requirements, and remove server-side credentials when the user logs out or loses access.
  • The BFF pattern buys control by adding infrastructure. It becomes another component to deploy, maintain, monitor, scale, and keep available because application traffic may depend on it. The trade-off is straightforward: greater control over token use in exchange for another operational dependency.
  • Native mobile applications should use storage designed for secrets, such as Keychain on iOS and KeyStore on Android. Helper libraries can simplify the implementation, but teams still need to verify where and how those libraries persist the tokens.
  • In-memory storage reduces exposure by discarding the token when the browser tab, application, or device session ends. The cost is repeated authentication. That friction may be justified for high-risk systems, but it can be excessive for ordinary customer applications.
  • Token binding with mTLS or DPoP can make a stolen token unusable without the associated certificate or cryptographic key. These approaches strengthen protection but add deployment complexity, making them better suited to controlled or high-security environments than most consumer applications.
  • ID tokens are intended for client-readable identity information, not sensitive customer records. Basic claims such as a name or profile image may be appropriate. Social Security numbers and other high-risk data should not be placed in a token merely because the platform allows custom claims.
  • Self-contained JWT access tokens let APIs verify signatures, expiration, and claims without contacting the authorization server on every request. That supports scale, but it also means the token may remain valid until it expires. Teams must deliberately balance decentralized validation against the need for faster revocation.
View Transcript

Who Should Watch This Webinar?

  • Security architects
  • Application architects
  • Identity engineers
  • Platform engineers
  • Frontend developers
  • Mobile developers
  • API developers

Topics Discussed:

  • OAuth token storage
  • Access and refresh tokens
  • Secure token transmission
  • Token leakage through URLs and logs
  • Browser local storage risks
  • Secure and HttpOnly cookies
  • SameSite cookie policies
  • Backend-for-frontend architecture
  • Cross-domain token handling
  • Mobile Keychain and KeyStore
  • In-memory token storage
  • Access-token expiration
  • Refresh-token revocation
  • JWT signature validation
  • Opaque access tokens
  • ID token handling
  • mTLS and DPoP
  • OAuth threat modeling

Speakers:

Dan Moore Photo
Dan Moore
Sr. Director of CIAM Strategy, FusionAuth
Dan Moore has spent his career across the full stack of software leadership, from back-end developer and engineering manager to CTO and AWS certification instructor at organizations including Oracle and Culture Foundry. He holds AWS and identity certifications and has contributed to 97 Things Every Cloud Engineer Should Know. His speaking reflects where his interests have landed: Identiverse sessions on CIAM, OAuth compliance, and decentralized authentication; Devnexus workshops on enterprise authentication and microservice architectures; and webinars on passkeys, modern MFA, and identity challenges in agentic AI workflows. He's also been a featured guest on Corey Quinn's Screaming in the Cloud.
Josh O'Bannon Photo
Josh O'Bannon
Support Engineer, FusionAuth
Josh O'Bannon has been fascinated by software since he wrote his first tic-tac-toe game in Applesoft BASIC at age 16. Today, that same curiosity drives his work as a Technical Lead focused on Customer Integrations, Identity systems, OAuth implementations, and the developer experience that surrounds them. He collaborates with customers on best-in-class security architecture, identity access management protocols, and ensures successful custom integrations and launches. Josh is collaborative by nature and brings genuine care to the customer experience.
Featured Ebook
Breaking Down JSON Web Tokens
get ebook
Breaking Down JSON Web Tokens cover
Share this post
Watch  On-Demand
Subscribe to The FusionAuth Newsletter
Get updates on techniques, technical guides, and the latest product innovations coming from FusionAuth.