session icon indicating copy to clipboard operation
session copied to clipboard

Allow async genid functions

Open benheymink opened this issue 10 years ago • 11 comments

The function I pass to genid to create the session id is the result of an async call to our backend - it would be nice if genid could work with async functions, as I can't seem to find a way around this!

benheymink avatar Dec 09 '14 12:12 benheymink

Yes, indeed. It's similar to https://github.com/expressjs/session/issues/52 but more concise on what I want to do. It would not be easy to make this a backward-compatible change, so it may need to wait to the next major.

Also, just remember, your session IDs should never be something like an auto-incrementing integer :)

dougwilson avatar Dec 09 '14 16:12 dougwilson

+1

maxpain avatar Sep 17 '18 14:09 maxpain

+1

michelcve avatar Feb 25 '19 10:02 michelcve

+1 ^ 10

armenr avatar Apr 29 '19 13:04 armenr

@armenr Your comment isn't super helpful - are you in favour of the proposed change? Or unimpressed with the folks adding thier expression of support?

benheymink avatar Apr 29 '19 13:04 benheymink

@benheymink - I was being a baby. :) I'm definitely in favor of this. Thanks for all the work you guys do to build and maintain the tools we use and love. I was just being bitchy.

armenr avatar Apr 29 '19 13:04 armenr

@dougwilson Hey Doug, if I may be so frank, is this still on your radar? It's been 5 years, so I thought I'd just ask ;-)

michelcve avatar Apr 29 '19 13:04 michelcve

Someone should submit a pull request.

dougwilson avatar Apr 29 '19 13:04 dougwilson

@dougwilson You mean, fix the merge conflicts in PR 121, or is that one no longer valid?

michelcve avatar Apr 30 '19 05:04 michelcve

What is the status on this please? I have a definitive need to have genid() function to support async/await or accept a promise. Please advise on this, thank you!

tfrancois avatar Nov 25 '23 17:11 tfrancois

I would really love to be able to do async genid when making a new session. I would appreciate it if this was supported. Thanks for the work!

shadow1349 avatar Dec 13 '23 16:12 shadow1349