session
session copied to clipboard
Allow async genid functions
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!
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 :)
+1
+1
+1 ^ 10
@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 - 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.
@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 ;-)
Someone should submit a pull request.
@dougwilson You mean, fix the merge conflicts in PR 121, or is that one no longer valid?
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!
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!