I'm trying to make use of this authentication feature:
So far I'm just checking what the possibilities are and what I've learned are as follows:
- httpNodeAuth scenario: cannot be used together with this as the function exported for the dashboard authentication is called after the httpNodeAuth authentication
- no httpNodeAuth scenario: when printing from the exported authentication function (implemented in dashboard-auth.js) the req.originalUrl on the console, I see some requests to files and the dashboard root /ui as well but I never see the socketid parameter
First of all, 1) is not a problem but let me know if it's possible.
Concerning 2): my plan is to carry out a passport js local startegy based authentication (user/pw) and use the socketid afterwards as an access token for the user identified. So that's why I'd need to get the socketid from the url. I also tried to get it from the query like req.query.socketid but I always get undefined only.
Do you think this approach to be feasible? If so, how can I get the socketid in the dashboard authentication function?
EDIT: figured out that after the # fragment identifier nothing is sent to the server so the question is rather that if the following is possible?:
Set up a flow (http request node) that gets executed first which sends back the socketid from the client. Then I could check if any user has already been authenticated with that socketid and if not, then force a user/pw logon.