Session Token

Session Token Definition

A session token is a unique string of characters assigned to a user after they first open or log in to a website or app. The token is stored on the user’s device, and the site’s server checks it to verify their identity every time the user makes a request. That way, the user doesn’t have to enter their password every time.

Not every site issues session tokens, but most do. They’re typically used by sites that need to personalize the user’s experience or track their activity. For example, online stores associate the items in a customer’s cart with their session token. This allows them to maintain the cart across different webpages even if the user isn’t logged in.

How Session Tokens Work

1. The user visits a website, starting a session.
2. The site generates a unique session token and assigns it to that user. Most sites will also generate a new token if the user logs in, either creating a new session or merging it with the old session.
3. A copy of the session token is stored on the user’s device, typically inside a tracking cookie. Another copy is stored on the server itself.
4. The browser attaches the session token to every subsequent request the user makes on the site, like opening a new page.
5. The server verifies the attached token. It checks a list of active sessions to confirm the user’s identity.
6. The site keeps track of user activity, like the contents of a shopping cart, by assigning it to the stored session token.

Session Token Properties

Read More

FAQ

The server issues a session token, and the browser typically stores it in a cookie associated with that website. Another copy of the session token exists on the server itself. The server keeps it in a database of active session tokens and user accounts or unique visiting users. It can invalidate and delete the token when the user logs out or if a predetermined amount of time passes without user activity.

No, a session token and a cookie are not the same thing. A cookie is a small file stored by the browser on the user’s device. Websites create cookies to store data to be used during a future session, like login status. A session token is a string of characters used to uniquely identify users visiting the site. The browser typically stores a site’s session token inside the cookie associated with that site.

Yes, but it’s unlikely. Typically, the server randomly generates session tokens, and they don’t have elements that could be used by third parties to identify the user. Also, servers usually add security flags to the token. They tell the browser to apply security rules, like only sending the token over secure HTTPS.

×

Time to Step up Your Digital Protection

The 2-Year Plan Is Now
Available for only /mo

undefined 45-Day Money-Back Guarantee