Discourse session variables

Hi everyone.

I want to know if i can retrieve a login session variable from the Discourse login, to use it in another route with NodeJS installed,
so they can only acccess to the content of this page if they are logged in on the forum.

Regards.

Don’t do it, man. Don’t try rummaging around inside cookies you didn’t create. It’ll end in tears. The internal format of the cookies that Discourse sets are liable to change at any time, in any way, without any notice – and they do.

What you want is to configure Discourse to act as an SSO provider, and then write your nodeJS app to act as an SSO consumer talking to Discourse. This topic should have all the info you need.

12 Likes

I’ll do that instead :+1:, thanks for your reply