oauth2与gmail api-重定向
由于 Google 将禁用“不太安全的应用程序访问”选项,因此我正在实现一个 Windows 窗体应用程序 (.NET Framework),用于使用 OAuth 发送电子邮件。我登录到 Google Developers Console 并创建了一个“桌面”类型的凭据。运行我的应用程序时,我被重定向到
https://accounts.google.com/o/oauth2/v2/auth/oauthchooseaccount?access_type=offline&response_type=code&client_id=...apps.googleusercontent.com&am p;redirect_uri=http%3A%2F%2F127.0.0.1%3A62437%2Fauthorize%2F&scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fgmail.send&flowName=GeneralOAuthFlow
我登录并发送电子邮件,但登录后,我被重定向到
http://127.0.0.1:56332/authorize/?code=somecode&scope=https://www.googleapis.com/auth/gmail.send
有没有办法不进行此重定向?我不需要它。如果需要,我可以更改此 uri 吗?重定向到 127.0.01 对我来说没有意义,因为它是我的客户端计算机的地址,该计算机安装了桌面应用程序。
As Google will disable the "Less secure app access" option, I'm implementing a Windows Forms Application (.NET Framework) for sending emails with OAuth. I logged into the Google Developers Console and created a "Desktop" type credential. When running my application I am redirected to the
https://accounts.google.com/o/oauth2/v2/auth/oauthchooseaccount?access_type=offline&response_type=code&client_id=...apps.googleusercontent.com&redirect_uri=http%3A%2F%2F127.0.0.1%3A62437%2Fauthorize%2F&scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fgmail.send&flowName=GeneralOAuthFlow
I log in and the email is sent, but after logging in, I am redirected to the
http://127.0.0.1:56332/authorize/?code=somecode&scope=https://www.googleapis.com/auth/gmail.send
Is there a way to not do this redirection? I don't need it. If required, can I change this uri? It doesn't make sense for me to redirect to 127.0.01, as it's the address of my client's machine, which has a desktop application installed.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论