kweb-core icon indicating copy to clipboard operation
kweb-core copied to clipboard

How to: manage session?

Open geomagilles opened this issue 4 years ago • 8 comments

KWeb has a great potential. But I miss examples on how to do the usual stuff. For example, It's not clear from the documentation which state of the server is shared among every client.

In particular, how to get separate sessions as a classical website with login?

geomagilles avatar Jun 15 '21 13:06 geomagilles

We definitely need more comprehensive examples illustrating best practices for things like user management.

Kweb gives full access to both local and session storage via Doc.localStorage and Doc.sessionStorage, but currently you need to build your user auth on top of those.

sanity avatar Jun 16 '21 14:06 sanity

Thx - I'm new with ktor, but is there a way to reuse ktor implementation?

geomagilles avatar Jun 16 '21 14:06 geomagilles

Hello,

I will conduct an example this evening

Viele Grüße,

Frank

Am 16.06.2021 um 16:47 schrieb Gilles Barbier @.***>:

 Thx - I'm new with ktor, but is there a way to reuse ktor implementation?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.

frnknglrt avatar Jun 16 '21 14:06 frnknglrt

@frnknglrt Thank you, that would be great :) Would kweb-demos be the right place for it?

sanity avatar Jun 16 '21 14:06 sanity

I’ll make you a pull request there

Viele Grüße,

Frank

Am 16.06.2021 um 16:53 schrieb Ian Clarke @.***>:

 @frnknglrt Thank you, that would be great :) Would kweb-demos be the right place for it?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

frnknglrt avatar Jun 16 '21 14:06 frnknglrt

I just did a starter template with a menu and a few routes - based on tailwind. Btw it's a great framework to use with Kweb. It took me a few days. It's not that long but can be discouraging. The main issue is that there is plenty of ways of doing it - the lack of guidelines is an issue.

Sidenote: I'm building myself a framework at infiniticio/infinitic to make distributed systems easy. I'm trying to use KWeb to propose a dashboard - as there will be a lot of dynamic contents. Question for you @sanity : what are the implications of your licence? Can I distribute a dashboard using Kweb within Infinitic?

geomagilles avatar Jun 16 '21 14:06 geomagilles

@geomagilles I'll check out tailwind.

To your second question, Kweb is released under the LGPL, which is a "non-viral" license. In summary, you can build on Kweb and distribute whatever you build, but if you modify Kweb and wish to distribute that modified version, you must make the modified source for Kweb available. You may find this FAQ helpful.

Best of luck with your project, please let us know how you get along :)

sanity avatar Jun 16 '21 15:06 sanity

I see the PR in kweb-demos. It's a great start.

Honestly, I state again that KWeb has great potential, but we need more libraries to extend the framework (like kweb-auth for authentification, kweb-router for routing, maybe kweb-template for templating ...) or alternatively a clear way to use existing ktor developments.

Btw, keep the good works and congrats!

geomagilles avatar Jun 17 '21 13:06 geomagilles

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

github-actions[bot] avatar Oct 09 '22 15:10 github-actions[bot]