Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Spring security for android app

I'm trying to consume a rest services from android.

I want the username and password is entered only once. Then the system can work without having to reapply username and password.

I do not know what would be the right way to do this. Save the password on the phone seems a bit insecure, maybe it's just my paranoia. applications like facebook, store the password in the phone?

What I'm trying to do is generate a token, store the token on the phone, and send the token in the header in each request. I do not know if it is the right solution. I can not find how to do this without the token lose the session.

I have also read about OAuth2, but I have not got any example of a small application That Demonstrates the use, not that of Facebook, Google, Twitter.

I used a Spring Server to communicate with my Android app.

like image 664
user60108 Avatar asked Aug 10 '26 02:08

user60108


1 Answers

I think you need to use OAuth2.0. for more information refer to this.

like image 169
Hossein Avatar answered Aug 12 '26 18:08

Hossein



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!