How do popular apps authenticate user requests from their mobile app to their server?

前端 未结 7 704
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-11-30 16:47

Say I have an Android application that connects to a .Net API for receiving/setting data. The confusion that I have is regarding how to sign-up/login the user first time and

7条回答
  •  庸人自扰
    2020-11-30 17:19

    Authentication example is a good place to start. Android stores credentials in the Account Manager, you can view accounts in Android's settings. This will automatically store tokens, prompt the user for credentials if expired or missing, refresh tokens etc. I find the http part of this example lacking or old. Extending android's AccountAuthenticatorActivity is a great helper to parse serialized data to the layout and back to the internet.

提交回复
热议问题