Discussion board where members can learn more about Integration, Extensions and API’s for Qlik Sense.
Im using the qlik-auth.js in my custom authentication module. Everything works great except for deleting the session.
So when a user clicks on logout the application directs him to /logout route where the deleteSession(req, res, profile, options) is fired
However i am getting the following error and haven't found a way to fix it:
No matching endpoint found
SyntaxError: Unexpected token N
at Object.parse (native)
at IncomingMessage.<anonymous> (C:\****
at emitOne (events.js:77:13)
at IncomingMessage.emit (events.js:169:7)
at IncomingMessage.Readable.read (_stream_readable.js:360:10)
at flow (_stream_readable.js:743:26)
at resume_ (_stream_readable.js:723:3)
at doNTCallback2 (node.js:439:9)
at process._tickCallback (node.js:353:17)
[nodemon] app crashed - waiting for file changes before starting...
Thanks for any help.
I have some similar issues and found that there are some wrong codings:
It contains some tests like
if(cert.indexOf(".pem")) // or similar
..but it has to be:
So, for me this has fixed thing where I coming to the point I get stucked: why and how I gonna pass the parameter TargetId? This TargetId is server-site generated. I cannot generate on I need to pass to deleteSession.
can you just store the targetId id ad proxyURI in a your session?
req.session.TargetId = url.parse(req.url, true).query.targetId ;
req.session.proxyRestUri = url.parse(req.url, true).query.proxyRestUri ;
Than pass the session property as the parameter?
If I store targetId and proxyRestUri in req.session of authentication module it's gone after the redirect. Any idea? It seems to be that the authentication call is made in a seperate session.
Shouldnt be. If you console.log(req.session.targetID) in your final destination url what does it return? One thing to do is use Redis or mongo etc and store the session information. This improves the user experience. For example in your login form you could have a field 'remember me', if checked would store the session in your db.
I'm just using qlikauth.init(req, res) which sets the needed values and the deleteSession().
But I would use another Logout method but haven't seen any workable code. All QPS DELETE messages I've tried giving a status 500.