Skip to content
This repository has been archived by the owner on Jan 3, 2019. It is now read-only.

How to store the loginStatus at server side ? #22

Open
xiaodu527 opened this issue Dec 20, 2016 · 2 comments
Open

How to store the loginStatus at server side ? #22

xiaodu527 opened this issue Dec 20, 2016 · 2 comments

Comments

@xiaodu527
Copy link

@janoist1 Hello , thanks for your repo. I have some questions , would you please help me ?

I used to save the JWT into localStorage when user logged in (Without SSR). But with SSR now, how could I save the loginStatus at the server side when user login at browser ?

By the way, I'm using a separate API server which writed by java.

@kuatro
Copy link

kuatro commented Dec 20, 2016

Hey @xiaodu527! You can simply use cookies, I guess.

@ReLrO
Copy link

ReLrO commented Dec 22, 2016

Any idea how I can use react-cookie (https://github.com/thereactivestack/react-cookie) to get isomorphic cookies to work?
I want to be able to have login information on the server side, so if a user is logged in, I wont get the "React attempted to reuse markup in a container..." warning message. So far I wasn't able to get this to work and I would really appreciate help.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants