donderdag, september 25, 2008

 

Live ID login

Today I experimented with Windows Live authentication. Microsoft has opened up its enormous 'Live' database of accounts (like hotmail.com or live.com), for other sites to use to log in users. It's the successor of MS Passport and free this time. There are more than 350 million Live accounts out there.

It's not like OpenID at all, but since I've implemented that yesterday, I enlarged the concept to also include Live ID Authentication. On the login page you can now choose to login with your traditional about2findout account, an OpenID or a Live ID.

To enable your site for Live ID authentication, you need to register first at Microsoft's site. You need to have the name of the application and a secret key, and where to send the response back.
On your site, you need to include the login button (an iframe script), and retrieve the userid that the Live ID server sends back to you on the page you specified during registration. Use the code from the free Web Authentication SDK.
Because that is all you get: if a user succesfully logs on with their Live ID, you won't get anything but a unique UserID. That means it is up to your site to get email, a friendly username, and other settings you might need. That UserID you can then use to store user information and de the normal login. The way I've implemented it, I store the UserID I get from the LiveID server in my users table, and create a regular account for them behind the screen. Much like I've done for the OpenID implementation in my previous post.

Useful links:
- Peter Bromberg's blog
- public Info Tech blog
- MSDN

PS At the moment, openid and live id are only implemented at the about3findout experimental site, they'll come to the main site when all testing is done.

Labels: ,


woensdag, september 24, 2008

 

OpenID login supported on about2findout.com

What is OpenID?
OpenID is an open, vendor neutral way of signing into web sites via one single account. No longer do you need to remember passwords for every single site (such as about2findout), but you can use your OpenID with all participating websites. An OpenID looks like a URL. You might actually have an OpenID already without knowing, as Flickr, Yahoo, Blogger and various other accounts can be used as OpenID. On a participating website, just provide your OpenID URL. You will be redirected to the OpenID provider (Yahoo, MyOpenID, Blogger, Flickr) for the normal signin, and redirected back to about2findout. For more information on OpenID, have a look at: http://openid.net/.

I've been looking at OpenID when first thinking about this site now two years ago, but at that time things were too complicated for me to incorporate that into an asp.net site. I'm not a die hard programmer, I need ready-made components I can plugin. Now I deemed the time right to add OpenID support to the site, as there is an excellent open source tool for adding it to asp.net sites : dotnetopenid. I still had a few more strange and exotic bugs and struggled 2 days with it, but I think I got it working OK now.

I've got about2findout.com to accept OpenID logins as well as our own accounts (the own a2fo accounts will not go away, this is just a new way of signing in). On the login page, there will be an additional box for your OpenID URL. If it is the first time you login via OpenID, you will be asked to accept the code of conduct and provide or confirm your e-mail address. As many users of the site have Yahoo accounts, I hope this will get more new visitors to login and gather points as there is no more need to set up a separate account.

Technically speaking
- I used the dotnetopenid latest version (2.5 at the time of writing). I experimented with the login box they provide, but that won't go together on the same login page as the traditional asp.net one, so I did the OpenID login programatically.

- There were two articles I found VERY useful, and recommend you to read them if you want to do something similar: Dan Hounshells blog and Andrew Jones' blog.

- I created myself a free MyOpenID.com account for testing.

- The documentation is not clear on that, but the dotnetopenid State object that can store the information you get back from the openid provider only works when you copy the state.aspx file to the app_code folder.

- The dotnetopenid login component works well, but gives error in a multilingual site like mine. I usually bind properties to language resources, but that gave strange behaviors with this component, so I didn't use it further.

- The xrds.asp link on the home page gave strange errors about header cannot be modified. Turns out the xrdspublisher by default does its magic via headers and that screws up the page refreshing I have implemented in Ajax on the main page. (The main page shows a new question every 30 seconds.) So I changed the mode of that component and it worked.

- You cannot rely on getting extra information back from the OpenID provider. That's why I redirect to a 'complete registration' page for new OpenID logins. At a minimum, I need everyone to agree with the house rules of the site. Once they confirm, a regular asp.net account is created for them in the normal way, with a random password.

- I'm using the javascript from IDSelector.com to get a nicer OpenID box. The JavaScript makes it easier for people to enter the correct URL. Most people will have an OpenID without knowing. The only big site missing in the whole OpenID movement is the traditional one: Microsoft with the competing LiveID.

As for now, the code has been released to the test site about3findout.com. When it works well with all kind of OpenID accounts, I'll release it to the main site about2findout.com.

Labels: , ,


vrijdag, september 19, 2008

 

Record week

It has been a record week for the site: we passed 160 quizzes, someone scored 1187 points in one week time (anandvymutt423), and two days ago we had 478 visitors, which is a new day record. Glad to see so many people like the site and contribute their questions.

Here are the latest quizzes:

RCGYF
5VQVX
A1RS2
H2XVN
http://www.about2findout.com/findout/doquiz_7of9.aspx?quiz=ASYER

Labels:


woensdag, september 03, 2008

 

It works on Google Chrome

Google released its own web browser, called Google Chrome. So I installed it (very easy), and used it to check the site about2findout.com. It works. Actually, it should as Google uses Firefox technology and other open source products behind the sobre screens. 

Labels: ,