Bluemix Single Sign On service: Node.js code for getting the currently logged in userid?

180 Views Asked by At

I am using Bluemix's Single Sign On service from a Node.js runtime, which is working fine. But now, I would like to access the userid of the user that is logged into the app. I can't find how in the docs or any API or way to do it.

Any help or sample about how to do it? I found some serialize and deserialize user functions within passport object, but really don't know how to use them (if really they do what I am looking for).

1

There are 1 best solutions below

2
On

It seems req.session.passport.user.id did the trick.