-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for browser wallets (like Alby) #6
Comments
I think you are referring to the sample web server example. That is provided merely as a starting point for users of this module who would like to see a full working example. Nodejs and specifically express.js give a lot of freedom to the developer to decide how to build and structure their web applications. I don't think any changes are required to this module, unless I am missing something else? |
While this issue was found in the sample web server example this module currently does not work with in-browser wallets for all applications that set their session configuration to However, some applications won't be able to change their session configuration. I think it would be a nice thing if this module would support this use-case regardless of the specific session configuration in place. Please let me know if I can be of any help. 🙌 |
Fixed by 987fc5f It was necessary to overwrite the |
Awesome, thanks for fixing it! 👍 |
Currently this authentication strategy does not work with in-browser wallets like Alby. (see getAlby/lightning-browser-extension/issues/662 for details)
After debugging this strategy for quite some time I finally found the root cause, where
resave
is set totrue
when configuring the session.While this works fine when you use a separate wallet (like on your mobile phone), using an in-browser wallet won't work because both the browser and the wallet share the same session and interfere with each other as
resave
will cause the changes on the session object to be overwritten at the end of the request.My quick-fix was to set
resave
tofalse
but since there could be people out there who rely on this configuration it would probably be a good idea to change the implementation to somehow support both configurations.The text was updated successfully, but these errors were encountered: