# Reading access token from localstorage in auth0

**URL:** <https://community.auth0.com/t/reading-access-token-from-localstorage-in-auth0/96558>\
**Category:** Get Help\
**Tags:** login-experience, new-universal-login-experience\
**Created:** [December 15, 2022, 5:16pm UTC](https://community.auth0.com/t/reading-access-token-from-localstorage-in-auth0/96558 "2022-12-15T17:16:23Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![iamarjun715](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/iamarjun715/32/41976_2.png) [@iamarjun715](https://community.auth0.com/u/iamarjun715)\
**Post date:** [December 15, 2022, 5:16pm UTC](https://community.auth0.com/t/reading-access-token-from-localstorage-in-auth0/96558/1 "2022-12-15T17:16:23Z")

</div>

I just want to know, how to read the access token from localstorage.  
I have set my cache location as localstorage  
Now the access token is available in localstorage but I can’t read it.

![image](https://global.discourse-cdn.com/auth0/original/3X/2/6/26e36a63eb9a9fa38e1147394743b9069d26415a.png)

![image](https://global.discourse-cdn.com/auth0/original/3X/a/6/a6ee5ed0d7bdcfd650ee84db90e8f5ee455eaef3.png)

---

<div class="post-metadata">

**Author:** ![ty.frith](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/ty.frith/32/58484_2.png) [@ty.frith](https://community.auth0.com/u/ty.frith)\
**Post date:** [February 18, 2023, 12:13am UTC](https://community.auth0.com/t/reading-access-token-from-localstorage-in-auth0/96558/3 "2023-02-18T00:13:23Z")

</div>

Hi there @iamarjun715 welcome to the community!

I apologize for the delayed response on this one, but was looking through our backlog and wanted to respond to this. You’ll want to use the `LocalStorageCache`:

> **[LocalStorageCache | @auth0/auth0-spa-js](https://auth0.github.io/auth0-spa-js/classes/LocalStorageCache.html)**
>
> Documentation for @auth0/auth0-spa-js

Hope this helps you or anyone else who may come across this in the future 🔮

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [March 4, 2023, 12:14am UTC](https://community.auth0.com/t/reading-access-token-from-localstorage-in-auth0/96558/4 "2023-03-04T00:14:08Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
