Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi guys,
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:\****
project\node_modules\qlik-auth\index.js:307:35)
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.
Hi Ralf,
Im using global middleware which gets launched in each route change app.use() which checks if the req.session.user is present. Also, Im not deleting the the session instance, but the actual user and all of its sessions instances Delete user ‒ Qlik Sense
var delSettings = {
host: url.parse(options.ProxyRestUri).hostname,
port: url.parse(options.ProxyRestUri).port,
path : url.parse(options.ProxyRestUri).path+'/user/'+profile.UserDirectory+'/'+profile.UserId+'?xrfkey='+xrfkey,
method: 'DELETE',
headers: {
'X-Qlik-Xrfkey': xrfkey,
'Content-Type': 'application/json'},
passphrase: options.PassPhrase,
rejectUnauthorized: false,
agent: false
};
Thanks, I'm doing exactly the same but getting a status 500 which means internal error..
No, not the same, using this: Delete user ‒ Qlik Sense
And then getting status 403.
if you console.log() your profile and options parameters which you pass into the request what do they show?