Protect API User Registration Endpoint used by Mobile App
<p>I've been recently learning to use JWT to secure user endpoints for an API I am creating for my mobile application.</p>

<p>I currently have a <strong>loginless system</strong>, where the app user gets automatically registered on the server, then gets automatically authorized and issued a JWT to use for all further requests. All the routes are protected except the following 2:</p>

<p>1) POST /register:
The most important one, that I could not figure out how to protect. Anyone with the URL can currently pass any login/password combo and consider himself registered, and subsequently obtain a JWT. <strong>I want to limit registrations to only my mobile application. How can I do that?</strong></p>

<p>2) POST /auth: Used to validate login/password and issue JWT. I guess it's ok to remain unprotected if I manage to protect the registration. But I do actually want to restrict it to my mobile client as well.</p>

<p>Thank you.</p>