nemiro-net / nemiro.oauth.loginforms Goto Github PK
View Code? Open in Web Editor NEWOAuth login forms for Windows Forms projects.
License: Apache License 2.0
OAuth login forms for Windows Forms projects.
License: Apache License 2.0
Hi,
I created an Dropbox account and login through Nemiro.OAuth.LoginForms. This works fine the first time.
But then I try to login again or when I login with other account on same computer, the OAuth.LoginForms
leads me simply back to auth screen.
Google and Microsoft Live are working fine.
When I use the login form to authenticate GitHub, the authorize button is grayed out:
Per the directions, first I do:
PM> Install-Package Nemiro.OAuth.LoginForms
then I do
using Nemiro.OAuth.LoginForms;
Then I do
var login = new GitHubLogin
(
"9fcad1f7740b4b66ba9a0357eb9b7dda",
"3f04cbf48f194739a10d4911c93dcece",
"http://oauthproxy.nemiro.net/"
);
Of course, do bear in mind that the tokens above are fake ones just for example purposes only.
Then I do
login.ShowDialog();
The Authorize button is greyed out/disabled. Further googling indicates that GitHub does this for "unsupported browsers." I notice that the Internet Explorer/WebBrowser control is utilized in the LoginForm
which is apparently deprecated for GitHub.
Brian Hart
I looked how to use LoginForms and there is address of proxy server https://oauthproxy.nemiro.net/ . Is it available the source code for this oAuth proxy server in order to install it on our server or to modify if necessery?
Library is currently using TLS 1.0 and fails on backends requiring TLS 1.2
var login = new DropboxLogin
(
clientId: "kzcgsmbxkxuyur2",
clientSecret: "6hu0cm96r18r4ct",
returnUrl: "https://localhost/authorize",
autoLogout: true,
loadUserInfo: false
)
{ Owner = this };
login.ShowDialog();
if (login.IsSuccessfully)
{
MessageBox.Show(login.AccessToken.Value);
}
else
{
MessageBox.Show("Error............");
this.Close();
}
I can log in Twitter and get the access token with your library & login forms (thanks!), but can't update my status (i.e. tweet). Why?
private void PostUpdateStatus()
{
this.Cursor = Cursors.WaitCursor;
var parameters = new HttpParameterCollection();
parameters.AddUrlParameter("status", this.textBox3.Text);
parameters.AddUrlParameter("oauth_consumer_key", this.ConsumerKey);
parameters.AddUrlParameter("oauth_consumer_secret", this.ConsumerSecret);
parameters.AddUrlParameter("oauth_token", Properties.Settings.Default.TwitterToken);
parameters.AddUrlParameter("oauth_token_secret", Properties.Settings.Default.TwitterSecret);
OAuthUtility.GetAsync
(
"https://api.twitter.com/1.1/statuses/update.json",
parameters: parameters,
authorization: this.GetAuth(),
callback: PostUpdateStatus_Result
);
}
Add a method to delete cookies.
Hi Aleksey,
thank your for last update. Droptbox works fine now.
I have a feature request. hubic.com is a storage provider like OneDrive, but much cheaper. Can you please integrate OAuth of hubic.com to LoginForms ?
It is very similar to G-Drive OAuth. So I suppose it will be easy copy and paste for your.
OAuth docs
https://api.hubic.com/docs/#/server-side
OAuth sandbox
https://api.hubic.com/sandbox/
Thank you!
Regards,
Ed
the access token returned from a livelogin form does not work with the latest onedrive sdk
obj.ShowDialog() //is the function call
This issue we are facing in a particular Microsoft Surface Pro device. The dialog box appears and closes automatically. Does not wait for the user input for username and password.
Can you please help us with this?
Thank you.
Susarla Nikhilesh.
Hi,
I'm using the Facebook Login form, but when the user does not consent the app, it throws a NullReferenceException.
That is the CallStack:
Nemiro.OAuth.dll!Nemiro.OAuth.UniValue.IsNullOrEmpty(Nemiro.OAuth.UniValue value) Line 1136 C# Nemiro.OAuth.dll!Nemiro.OAuth.UniValue.operator !=(Nemiro.OAuth.UniValue x, string y) Line 2067 C# Nemiro.OAuth.LoginForms.dll!Nemiro.OAuth.LoginForms.Login.GetAccessToken(string authorizationCode) Line 400 C# Nemiro.OAuth.LoginForms.dll!Nemiro.OAuth.LoginForms.Login.AuthorizationCode.set(string value) Line 136 C# Nemiro.OAuth.LoginForms.dll!Nemiro.OAuth.LoginForms.Login.DefaultCallback(object sender, Nemiro.OAuth.LoginForms.WebBrowserCallbackEventArgs e) Line 351 C# Nemiro.OAuth.LoginForms.dll!Nemiro.OAuth.LoginForms.Login.webBrowser1_DocumentCompleted(object sender, System.Windows.Forms.WebBrowserDocumentCompletedEventArgs e) Line 274 C# Nemiro.OAuth.LoginForms.dll!Nemiro.OAuth.LoginForms.Login.webBrowser1_DocumentTitleChanged(object sender, System.EventArgs e) Line 236 C#
I think the erros in response should be treated first. Would you mind if I send a pull request?
Cheers
Я хочу авторизоваться в Тамблере, но не понятно, какой callback url необходимо прописать, чтобы получать токен. Так как приложение WinForms, я не могу прописать адрес своего сайта, потому что его нет.
ILoginForm should be public so that new classes can derive from Login and implement WebDocumentLoad() for different handlings. Currently the interface is internal.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.