wpf 如何登录谷歌账户
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/11736242/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to login into google account
提问by Nick
I'm trying to login into Google accounts in a C# WPF application.
我正在尝试在 C# WPF 应用程序中登录 Google 帐户。
I have a window with two textboxes called tb_nickfor nickname and tb_passfor password. I want that if I enter Google username and password and I press login I'll connect to my account with a message that says "connection OK" or something else.
我有一个窗口,里面有两个文本框tb_nick,分别是昵称和tb_pass密码。我希望,如果我输入 Google 用户名和密码并按登录,我将连接到我的帐户,并显示“连接正常”或其他内容的消息。
Can anyone help me please? I'm new in programming.
有人可以帮我吗?我是编程新手。
采纳答案by Peru
See if this helps https://developers.google.com/accounts/docs/OpenID
看看这是否有帮助 https://developers.google.com/accounts/docs/OpenID
Stackoverflow is a good example. You can use OpenID provided by Google to sign in.
Stackoverflow 就是一个很好的例子。您可以使用 Google 提供的 OpenID 登录。
回答by Riccardo
For enabling users to login from your application you should use ClientLoginbut as you can see it's part of the old Google Api library Gdata. You still can find it and you can use such authentication but i advise you not becouse has several security drawbacks(and this is probably the reason for which Google took it away). Instead use OAuth 2.0.
为了使用户能够从您的应用程序登录,您应该使用ClientLogin,但正如您所见,它是旧 Google Api 库 Gdata 的一部分。你仍然可以找到它,你可以使用这样的身份验证,但我建议你不要因为它有几个安全缺陷(这可能是谷歌把它拿走的原因)。而是使用OAuth 2.0。
回答by Eisfuchs
Hey you can do it by using the google API. Google APLI GMail Auth
嘿,你可以通过使用谷歌 API 来做到这一点。 谷歌 APLI GMail 身份验证
On https://developers.google.com/you will find many informations how you can use google from an external Program.
在https://developers.google.com/ 上,您会找到许多关于如何从外部程序使用 google 的信息。

