question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

The same session id

See original GitHub issue

Hi, why I have the same session id in cookie all time

{
  session: 'eyJpc0F1dGhvcml6ZWQiOnRydWV9',
  'session.sig': 'MQ71ACs_SuMd_6CqtSXfwd91zoE'
}

I used different browsers, delete cookies from browser, reload server. But is the same eyJpc0F1dGhvcml6ZWQiOnRydWV9 combination all time. Is ok, or I don’t understand something 😄 I thought session id must be unique all time…

The options:

{
  keys: ['mix of the drink', 'another mix of the drink :DD'],
}

The repo.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
RevealedFromcommented, May 19, 2017

the entire session is in that cookie. The value ‘eyJpc0F1dGhvcml6ZWQiOnRydWV9’ is just a Base64 encoded JSON object.

Is the function to verify the cookie against session.sig exposed so that I can read session variables securely in a module (socket.io) that is not in the Express route?

1reaction
dougwilsoncommented, Apr 24, 2017

Hi @ideal-life-generator this module doesn’t store session IDs at all; the entire session is in that cookie. The value 'eyJpc0F1dGhvcml6ZWQiOnRydWV9' is just a Base64 encoded JSON object. You can decode it yourself:

$ node -pe 'JSON.parse(new Buffer("eyJpc0F1dGhvcml6ZWQiOnRydWV9","base64").toString())'
{ isAuthorized: true }
Read more comments on GitHub >

github_iconTop Results From Across the Web

can session id be the same for different sessions at the same ...
If session IDs were duplicated at the same time, it would mean that two (or more) of your visitors ...
Read more >
Different browsers share the same session ID?? - MSDN
I open my application in 2 different mozzila browser then they share the same session id and my all session variables being overwritten...
Read more >
What is session ID? | Definition from TechTarget
A session ID is a unique number that a Web site's server assigns to identify a specific user for the duration of that...
Read more >
Same session ID(with same SQL text) but 3 different ...
I see that i have several same sessions(session_id) with multiple connection_ids. All are in suspended state(must be waiting for some resource..
Read more >
Session ID - Wikipedia
In computer science, a session identifier, session ID or session token is a piece of data that is used in network communications (often...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found