I'm new into REST APIs and developing an API that is going to be used for iOS/Android/Web apps, but I'm unfamiliar with the kind of threats the APIs face once published. I see these same tips all over:
I think using SSL/TLS and JWT should be enough security for sending/receiving data, but even with that, I fear the possibility of SQL injection if someone stole credentials.
Should I check the requests for SQL injection strings (such as this one)? And if I'm going to support user login, would it make more sense to use oAuth instead of JWT?
sql-i
using prepared statements will get you a lot of the way (further reading)
consider using ORM layers to interface with your db (eg: gorm)
security principles
always validate user input before performing any operations on it
for every operation, if you know of the universal set of options, opt for an allow-list approach vs a deny-list approach (i.e., I will only allow a string to pass through if it belongs to my known list)
auth