c# - How to determine which domain a mobile client belongs to -




i have following set web application

user x (browser) --> www.companyx.com/api/somemethod()--> database x

user y (browser)--> www.companyy.com/api/somemethod()--> database y

on web application, web config file contains baseuri

so company x = www.companyx.com , y = www.companyy.com

from can determine relevant base uri.

now trying write xamarin android app this, when app downloaded user, best way, or how can go determine company user belongs to, , therefor determine , save baseuri local storage?.

one of idea was, during logon screen, user enters email , password, , iterate though existing logon end points

www.companyx.com/api/logon()

www.companyy.com/api/logon()

www.companyz.com/api/logon()

which in turn potentially hit databases find email address , when finds it, know company user belongs , store base uri in local storage.

but dont approach, wondering if there better way this?

thanks in advance.





wiki

Comments

Popular posts from this blog

Asterisk AGI Python Script to Dialplan does not work -

python - Read npy file directly from S3 StreamingBody -

kotlin - Out-projected type in generic interface prohibits the use of metod with generic parameter -