How can I get the OAuth2 authorization code into a Delphi 10.3.3 or 10.4.2 VCL desktop application (Exe), instead of getting it in the browser address bar?
Mybe using TEdgeBrowser or indy components ?
Thanks in advance
Usually, there should be a redirect URL that the browser is redirected too after the client authorizes your application. (Note: I believe they often like an actual browser doing the authorization)
You make your delphi application have a web server listen on port 1234 (for the above example), and process the result when it arrives.
Geoff has an example.
GitHub - geoffsmith82/GmailAuthSMTP: This project is a very basic demo showing how to authenticate with OAUTH2 and send an email message for gmail, microsoft/office365 as well as hotmail.com/outlook.com/live.com email addresses.