Flask server and angular user session management

210 Views Asked by At

I'm building a simple web server in Flask which returns JSON data from REST requests.

The server communicates with an Angular front-end.

I want to manage user authentication and sessions (with crowd), but saw there are various ways to implement this.

It's unclear to me at which level I should implement the session (and authentification) management:

  • Should it be done in the backend server, with forwarded input data (login/password) from the front-end?
  • or, Should it be done at the front-end level, at least for the session management?

What is the preferable approach for this?

Thank you

1

There are 1 best solutions below

0
DhaniPro On

In my opinion, the good authentication and sessions carried out on the server-side The advantage is that you can manage the user when login or log out and then more secure