c# 4.0 - How to manage state between android app and ASP.net Web API? -
we have android app through retailer can recharge customers mobile. need authorize every recharge request.
to send recharge request retailer needs hit api recharge related information , userid , userkey. below
[acceptverbs("get")] public ihttpactionresult prepaid(int puserid = -1, string pkey = "", string pcustomerno = "", decimal pamount = 1, int pserviceproviderid = -1, int pdevicetypeid = -1)
we authenticate user every api hit comparing userkey(encrypeted password) password stored in db
this makes many db calls , our server gets slow
its b2b app , retailer perform different kind action transaction history, credit request, book complaint other recharge
how maintain state after user login android app
if userkey unique identification every user, or every 1 unique mobile number, think better verify mobile number user using make recharge sending otp. user can send otp authentication. @ time of login, , store unique user key have generated in shared preference storage.
Comments
Post a Comment