I’m developping an Android App which can add an End Device to The Things Network (the user of the app should have its own TTN account). I have successfully implemented the HTTP requests to add the device to the identity server, network server, join server and application server. For the moment I’m using an “API Key” but I’m now looking at OAuth (which is new to me).
I have used the command “ttn-lw-cli.exe clients create…” to create a client. It returns the cliend Id and Client Secret to use.
I have then tried what is indicated on Authentication | The Things Stack for LoRaWAN
by sending the user to the authorization URL. The Browser displays an URI like
http://localhost:11885/oauth/callback?code=XXXXXXXXXXXXX
It corresponds to
https://<REDIRECT-URI>/?code=<AUTHORIZATION-CODE>
of the documentation.
I’m afraid that it is not what I wanted because I’ve not been asked for the user login and password.
I think that my mistake is that I have used “–organization-id” during the client create request (I have followed the advice of htdvisser in Can't create OAuth 2.0 client). I think that I should switch to “–user-id”.
I’m wondering where I will have to provide the user password. Probably that I have not well understood how it should work… sorry for that.
Can you please help me to get back on track?
Thank you!
Regards