I was looking for a setup to test my OAuth2 Knowledge and I found excellent videos and articles in internet. Specifically I followed this one:
Now, trying to create my own test I went to my Google Cloud Platform Console and create my Oauth2 Client Id and Consent Screen. Please, note that GCP offers different options to add a Client Id. I selected the one for Web Application Client.
OAuth2 needs consent screen
Now, lets test with OAuth2 debug tool: State is not in screenshot but I set it to “anti-forgery”. See success screen.
And it worked!
Then use code to get token. I used Postman: