julianlam / nodebb-plugin-session-sharing

Allows login sessions from your app to persist in NodeBB
MIT License
86 stars 66 forks source link

Allow JWT token to be passed as a query param #124

Open TannerPlauche opened 2 years ago

TannerPlauche commented 2 years ago

FEATURE REQUEST

Allow JWT to be passed as a query parameter.

Currently nodebb-plugin-session-sharing detects the JWT via a domain specific cookie. This could be expanded to include a query parameter, for example www.mynodebb-forum.com?session-token=qweqwe.qweqwe.qweqwe.

The reasoning for this feature is that cookies cannot be set programmatically when opening a brownser tab/window from a mobile device. It is possible in some cases to pass cookies from fully native applications to webview components. That solution is only viable for webviews on fully native apps, and query params are universal and would apply to all platforms.

waschinski commented 1 year ago

That's a great feature request I'd like to see implemented.

As an inspiration, I like how FastComments implemented something like that.