cloudboost icon indicating copy to clipboard operation
cloudboost copied to clipboard

VueJs Server Side Rendering support

Open John0x opened this issue 8 years ago • 4 comments

Hey, there does not seem to be any advanced control over the login/auth process for users. I need to be able to support server side rendering with vuejs 2 and therefore I need to be able to use cookies to store the auth token or whatever is used for authentication. Is there already a solution to this?

John0x avatar Apr 10 '17 08:04 John0x

So, you need to access the session on your custom server?

nawazdhandala avatar Apr 11 '17 04:04 nawazdhandala

I have an express server, that renders my vuejs app on the server and then sends the rendered html to the client. Therefore I need to be able to login the user on the server in order to be able to render user content on the server. Currently I'm using loopback for my backend. I have the access token stored in a cookie which I can access from both the client(browser) and the server (express), that token gets sent with every request I make to my rest api in order to login the user and request protected data.

What's the process of cloudboost for this? I need to able to give the session or token or whatever cloudboost uses manually to the client sdk.

John0x avatar Apr 11 '17 08:04 John0x

If you're already doing a session management with loopback, you can still use the CloudUser on the client and log the user in on the client side, once the user is successfully logged in you can create a session (with the CloudBoost UserID, ofcourse the session will be encrypted) on your loopback server.

Let me know if this helps.

nawazdhandala avatar Apr 12 '17 06:04 nawazdhandala

@nawazdhandala I'm planning on replacing loopback with cloudboost, so that's sadly not a solution.

John0x avatar Apr 13 '17 07:04 John0x