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
Elm doesn't prevent you from using cookies. If your server sets a cookie in the response header, the browser will include that cookie in future requests for that domain until the cookie expires. So you can still have a server endpoint where you submit a username and password to authenticate a user, that responds with a cookie header to login the user within the current browser/user-agent. Elm doesn't have to know anything about that. It's all handled by the user-agent.
In order to notify your Elm app that the user was successfully logged in, you could either use appropriate HTTP statuses, and check those in your elm app (i.e. if the response code is 200, the user is logged in, if it's anything else, it failed) or return some JSON value, and read that to tell whether the user is logged in and/or what their ID is, etc.
Does that answer the question, or am I missing the focus?
Hello !
I have a use case :
I need to have a authentication like rails+devise but handled directly by Elm.
How would you do that without cookies ?
The text was updated successfully, but these errors were encountered: