android - Yii2 + Stateless RESTful API + Mobile App: How to prevent abuse when app offers option to send verification via SMS -
i have built mobile app using angularjs/ionic , website/api using yii2. in app have option users request verification code via sms.
here's app flow:
- user signs on mobile app
- api registers user, generates welcome email containing verification code , returns access token; access tokens valid 14 days
- user can request new code via sms
my api stateless , implements httpbearer , basic auth, , rate limiting. currently, rate limit 75 calls in 10 minutes.
so, here questions:
- can restrict access api allow calls made mobile app
- what can done prevent api abuse , sending random phone numbers sms message?
- how can validate phone number entered belongs user?
the problem: if api endpoints discovered , supplied valid credentials, sms messages sent phone number. also, app, person can input phone number , sms attempt delivered number.
i have seen many apps offer sms feature, i'm not sure how best approach it.
i appreciate thoughts on this.
cheers, mike
Comments
Post a Comment