Use of OAuth in Android Application

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

@oliviergrenoble - saw the mod request to delete the thread, however, the TTN Forum is a shared experience and knowledge base where any of us see problems and battle issues and ask questions of each other to try and resolve. When solutions are found or even when not if possible solutions are attempted but fail or as we learn how things work those TTN/TTS life lessons are a valuable resource to others. :+1:

Clearly looking at the deleted threads you found your problem and - unless embarassed by this (and no reason why you should be! :wink: ), or have other legit reason for removing the thread - it would be good to leave your posts/experience up on the forum for others to find if they end up in similar situation/problem as a way to solve or explaination of missed steps/errors. We will leave post for now and unless you insist with repeat request to delete, say over next 24/48hrs, will continue to make available to the community, OK? :slight_smile: