I have a question,
Is it possible to use Google user accounts for authentication in WinFormsAPP?
I need to write an application in C# Winforms that reads user-specific data from a database.
Is there an easy way to authenticate using Google?
I might be able to store a list of valid Google users in my database, or maybe I can even define a list of valid application users in Google?
Is there perhaps already a sample project for this case somewhere? I actually can't believe that I am the first developer with such a requirement...
I am grateful for any help or suggestion!
Have a look at:
Integrating "Sign In With Google" Functionality To An Application
Login using Google OAuth 2.0 with C#
Related
We are getting some requirements from customers wanting Single Sign On and simple user Rights setup for our WinForms application using Active-Directory.
The application has integrated sign in functionality using WCF.
I have been searching around for some guidelines but I always end up finding answers about WebForms and MVC projects.
Does anyone have any experience with this or some links that could guide me in the right direction?
I have really no experience with AD integration but know that the newer .net frameworks have built in functionality for this.
Thanks in advance :)
To perform SSO in windows applications is easy, you get the currently logged in AD user and accept that at face value.
System.DirectoryServices.AccountManagement.UserPrincipal.Current
Anything else will not be SSO. SSO stands for single sign-on, and when logged into windows the user has already done the single sign-on.
If what you want is to check the username/password they enter against AD, this isn't SSO, but you can do that with the ValidateCredentials method of a PrincipalContext object from the above namespace.
I am trying to integrate a Facebook news feed into a website using Facebook C# SDK https://github.com/facebook-csharp-sdk
var client = new FacebookClient("token");
dynamic me = client.Get("username/feed");
I have not been able to find any examples of generating an access token at runtime. All examples seem to be targeted at client apps where a used would be required to authorise the application.
Based on what I've seen so far, there used to be a way to generate a permanent access token (using offline_access permission), but as of 2nd May 2012 that approach is deprecated.
At the moment, I am not sure this is even a supported scenario.
Is it possible to get Facebook news feed entirely using server-side code with no user involvement?
EDIT: Looks like there might be a way: https://developers.facebook.com/roadmap/offline-access-removal/#extend_token
Will try later and report back.
no, you can't do anything with username/password. the user has to enter these into facebook's login ui and click the button to agree to letting your code do whatever it's asking to do.
I am designing a web site to use OpenId and Google is one of the main providers I have selected. What I would like to do is use Google's Calendar & Contacts (possibly docs) as a backing store for each individual user. In other words, if the user on my site wants to have access to a Contacts List, Calendar, etc they must register their Google account. Then they can add/edit/delete to their heart's content as it is their info. (And yes, I have a specific idea in mind for where I am going, just need to figure out how to tie OpenID to GData.)
Has anyone written a tie in between OpenID/OAuth and using the Google APIs?
After a lot of digging in to this problem I have 2 ways of solving this.
Use OpenID and on the user's profile, have them enter their google credentials (works but not a great solution)
Use OAuth. This requires registering your domain with google and getting a key to use with OAuth. Once you set that up it is easy to access a end user's data stores on google.
Look at google's OAuth 1.0 for Web Applications.
Also look at OAuth-OpenID: You’re Barking Up the Wrong Tree if you Think They’re the Same Thing for a good overview of OpenID vs OAuth.
Have you looked at DotNetOpenAuth? It will allow you to connect to any open authentication provider that supports OpenID and Google is one of the providers listed on the OpenID page.
Has anyone written a tie in between
OpenID/OAuth and using the Google
APIs?
I'm not sure what you mean by that... if you're asking if there is a library that allows you to user your google account as an OpenID, then yes: DotNetOpenAuth. There are some catches tho, see Andrew Arnott's answer to this question.
Im looking to create a web application using ASP.NET MVC or PHP (not decided yet!) and I want to use the local ActiveDirectory to register users. Can anyone point out how to do this on PHP or ASP.NET?
Would like answers on any of the technologies
Best regards,
David
For ASP.NET MVC you should ActiveDirectory membershipProvider. Check this
MSDN for more information, how to use and configure it. You have several ways to implement this:
with Windows authentication, which basically tells to the browser to handle the authentication process for you (gathering the username and password from the user)
with Form authentication, where you have to implement your custom form in order the user to be able to provide you with his username and password.
For PHP you integration will be not so out-of-the-box. To be honest I've never tried this, but you should deal with the LDAP object to be able to integrate your Active Directory. You can try this article for more info.
As an organisation, we use Google Apps. We have the paid version (mapped to our domain) etc...
We are developing a web based application to manage orders, and other business functionality.
I want to be able to use federated login with our google apps accounts-
For example, if a user is logged in to their email (gMail) - they should automatically be logged in to our ASP.net application
If they're not logged in - the log in form should auth. against our google apps account.
How can this be done?
Is it possible to be able to "get" the user who is currently logged in using this method etc...?
Sure, use dotNetOpenAuth. It's recommended by OpenId library and it should be easy in use. As far as google provides OpenId interface there should be no problem with using it in your application.
Stackoverflow is successfully using it and I'm logged here always when I'm logged on my google account.
Just doing a quick search through Google's API documentation, it sounds like you need to use Google's implementation of OAuth protocol.
If you have not yet started developing, you could even considering developing for Appengine - using python or Java (though I would prefer Python myself).
Advantage is that it has a much closer integration with Google Apps services and it will be much easier to build further functionality that works with Google apps (docs/mail etc). Besides this, there arent too many hassles for hosting the app.