# What is the best practice to save token?

**URL:** <https://community.auth0.com/t/what-is-the-best-practice-to-save-token/101630>\
**Category:** JWT.io\
**Tags:** header, jwt, database\
**Created:** [March 2, 2023, 10:36am UTC](https://community.auth0.com/t/what-is-the-best-practice-to-save-token/101630 "2023-03-02T10:36:34Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![anxhelocenollari](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/anxhelocenollari/32/45061_2.png) [@anxhelocenollari](https://community.auth0.com/u/anxhelocenollari)\
**Post date:** [March 2, 2023, 10:36am UTC](https://community.auth0.com/t/what-is-the-best-practice-to-save-token/101630/1 "2023-03-02T10:36:34Z")

</div>

When i first started working with java springboot and jwt implementation i heard from every tutorial that token is stateless and must be saved on Authorization header for each request.

But many people are telling me to save on database cuz with a simple inspect they can get it and use on my endpoints. Am i getting something wrong here or these guys dont know about jwt? Can someone explain the stateless meaning also? Thanks in advance!

---

<div class="post-metadata">

**Author:** ![dan.woda](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dan.woda/32/18340_2.png) [@dan.woda](https://community.auth0.com/u/dan.woda)\
**Post date:** [March 6, 2023, 10:11pm UTC](https://community.auth0.com/t/what-is-the-best-practice-to-save-token/101630/3 "2023-03-06T22:11:12Z")

</div>

Hi @anxhelocenollari,

Welcome to the Community!

There are quite a few resources on the web about these topics, Google is your friend here.

Tokens aren’t saved in the auth header, they are _sent via the auth header._ Storage will depend on the token type (is it a user token or M2M token? on the client or server?).

Stateful vs stateless generally means the token is being kept track of by the server. A stateless token generally carries a payload that tells the server when it expires, the intended audience, etc.

---

<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 20, 2023, 10:11pm UTC](https://community.auth0.com/t/what-is-the-best-practice-to-save-token/101630/4 "2023-03-20T22:11:14Z")

</div>

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