I'm developing a small application using MySQL, Spring & Angular, Is it OK to provide login also as a service or i will it be good to do login from server side and then serve index.html.
it doesn't really matter. the server still validates every request the main benefit of client rendering is bandwidth throttling. :)
Edit and ofc the 100 ms rule as well as the possibility of the offline manifest and so on :) ....
If you're using Spring I'd recommend taking a look at Spring Security. You should be able to quickly plugin authentication/authorization workflows.
Vasanth Gopal
Server side is better.
Consider a scenario where user lands on the different page in the app before login. The user should be redirected to login page.
It's seamless to check the login session token in the server side, and redirect to serve login page.
If such redirection happens on the client side, the experience may not be seamless, as the user notices a flash of the original page, then request goes to login service to validate and then redirection happens.