[ User authentication and authorization for Android app which connects to a server running a Spring Boot application ]
I am developing an Android application that which connects connects to a backend server running a Spring Boot application to fetch certain details.
The android app provides the login interface to the user. The app also provides the user the option of registering with a separate username/password and login with the same instead of using facebook/twitter account. Once logged in successfully using facbook/twitter or the registered username/password, any calls made by the Android app to the Server application, therafter, needs to be authenticated at the server end also.
Thus, the users have both the option of social login as well as custom login. The user will enter the details though the android app but the authentication needs to be there for both android and spring (server) end.
For standalone applications built on Spring framework, I prefer to use Spring security but this one has an Android application as the frontend instead of a browser. What will be the best way to approach this problem of user authentication as well as authorization?
Answer 1
Have you seen this blog: https://www.future-processing.pl/blog/exploring-spring-boot-and-spring-security-custom-token-based-authentication-of-rest-services-with-spring-security-and-pinch-of-spring-java-configuration-and-spring-integration-testing/
Does what you want to do with Spring Security.