The app itself will act as server; there is no other device connecting as clients.
The initial html page presents user with "Authorize with google" , upon successful authorization, another page (redirected page) will show with insights/ details from the users authorized mail account.
I am trying to integrate the app using "Authorised redirect URIs" in google cloud API project (ref image) to authorize and redirect the page. I tested the app giving localhost without port the page never gets redirected.
Please refer the screen, the Authorised redirect URIs section - When URI is given with path i.e. specific page, users will be redirected to this path after they have authenticated with Google.
The "Authorise Javascript origins" section expects only domain with HTTP origins that host the web application.
Ask yourself where exactly you are hosting/serving this web application from. Certainly not from your device. If you must have a response receiving web page, then use an online web server to provide it, and capture the response using the Web component.
Please consider this in the context of a locally hosted web application within an app, the web application is being served from the device itself, which means that the device is acting as both the client and the server. In this case, there is no need to use an online web server to provide the response.
More like using http://localhost:8000/testauth.html - this will invoke the google authorize api and subsequently redirect upon successful authorization.
In a scenario of deploying testauth.html on a website, like you mentioned website domain will replace the localhost.
This url http://localhost/.... can be accessed ONLY by yourself. The google authorize api can not access it. So you have to use a public url to let google to redirect to there.
Sure. Currently I've setup the URI in Credentials section as "localhost:8000" is to test it on the desktop using a local webserver (amp, python SimpleHttpserver).
The tests were successful - with the initial page setup with "Sign-in with Google" and after user authorize it directs to the page I've given in the "Authorized Redirect URI" section (please refer screen shot from earlier reply).
I am now looking to deploy this as mobile app where I need your guidance on local webserver / alternatives.