You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Almost any app would want to use authentication. While the server side implementation in the template can be just a plug:
let login username password =
if username = "jonh" && password = "123" then
Ok username
else
Error "go away"
the whole plumbing of Fable/Feliz communicating with the server and updating global state (for logged in status, for example) is not very trivial for a beginner and would deserve a simple example. I could only make it work with Elmish, not with the provided sample of useDeferredCallback
The text was updated successfully, but these errors were encountered:
I partially agree. It's not a trivial task, but on the other hand, it would make the whole template more robust with things like JWT access token generation, refresh token retrieval, refreshes on the background, etc... It would also imply a single solution for authentication where there are many of those (custom, Azure AD, Auth0, etc...)
Let me reiterate - I explicitly don't want to provide any meaningful server side implementation for this very reason. Just have a simple function which checks a hard coded user - and send a cookie if passes. The real value for the template users would be in showing how client <-> server communication actually happens. With React state update.
Almost any app would want to use authentication. While the server side implementation in the template can be just a plug:
the whole plumbing of Fable/Feliz communicating with the server and updating global state (for logged in status, for example) is not very trivial for a beginner and would deserve a simple example. I could only make it work with Elmish, not with the provided sample of useDeferredCallback
The text was updated successfully, but these errors were encountered: