How to use Blockstack Connect alongside UserSession sign-in

#1

Hello,
In the documentation for BlockStack connect, it says that authOptions should create a userSession object (named userSession) if it is not passed in through the constructor:

userSession : (optional) - pass a UserSession instance to use for authentication. If it’s not passed, @blockstack/connect will create one for you.

However when I try to reference userSession later in my code, I am getting a “Uncaught ReferenceError: userSession is not defined”.
We do call “blockstackConnect.showBlockstackConnect(authOptions);” so this should implicitly call the authenticate method of userSession.
Is there another way that I should be referring to the userSession variable that is allegedly created?

#2

Can someone answer this?

#3

This might imply that Blockstack Connect did not create a User Session. I’m not sure what is happening here.