4 ms·
I implemented persona for ASP.Net MVC3 and it was hands down the easiest login system I've ever built in my career. From a developer standpoint it's very intuit
by sergiotapia 14y ago
I implemented persona for ASP.Net MVC3 and it was hands down the easiest login system I've ever built in my career. From a developer standpoint it's very intuitive, the documentation is great, and I loved it so much I open sourced my implementation.
https://github.com/sergiotapia/ASP.Net-MVC3-Persona-Demo https://github.com/sergiotapia/ASP.Net-MVC3-Persona-Demo
Please give this a shot! I would only like them to keep more information on hand, like a first name, or an avatar so I don't pester my user with such requests.
- 6a68 14y agoThanks sergiotapia! Please ping the dev-identity list with your feature ideas, or open a bug on github; our roadmap depends on community input. We have a list of libraries/plugins in a ton of other languages on MDN: https://developer.mozilla.org/en-US/docs/Persona/Libraries_and_plugins https://developer.mozilla.org/en-US/docs/Persona/Libraries_a...
- sergiotapia 14y agoWhere would this github be? Do you mean the browserid repository on Github?
- 6a68 14y agoYup! https://github.com/mozilla/browserid/issues/new https://github.com/mozilla/browserid/issues/new
- groks 14y agoI don't think you've actually implemented the protocol. Like most of the other examples I've looked at, you explicitly check every login attempt with the hard-coded mozilla verifier. This breaks two of the selling features of browserid: 1) Your identity provider doesn't know where/when you login because the relying party (the website) is supposed to cache the identity providers public key. 2) When identity providers start implementing browserid, it's not going to make any difference because you're not checking back with the identity providers website, as encoded in the assertion. What you've implemented here is more like Microsoft Passport - a single point of failure through which all logins flow. So, as a bootstrap mechanism the Persona service fails, because assuming people jump on the browserid bandwagon, we'll still be stuck using Persona because all the websites have implemented the protocol wrong (as in this case).
- sergiotapia 14y agoYou're correct. This is _not_ a persona provider. It would be more correct to call it "Here's how you can use Persona in an MVC3 application." --- >So, as a bootstrap mechanism the Persona service fails, because assuming people jump on the browserid bandwagon, we'll still be stuck using Persona because all the websites have implemented the protocol wrong (as in this case). Please elaborate here. You can just switch out the provider (in my case Mozilla) for another one easy enough. You're not tied down to a particular implementation.
- groks 14y agoThat's right, you're not a 'provider', you're a 'relying party' - but you are unconditionally relying on the bootstrap mozilla service. You're not supposed to swap that out and rely on some other service, you're supposed to look at the assertion provided by the browser (or the javascript shim right now, while we bootstrap). Who you verify the assertion with depends on the user's email address. So, if tomorrow Google added support for browserid to Gmail, and jo@gmail.com tries to log in to your website, he would claim to be jo@gmail.com and pass you an assertion to that effect. You need to check that with Gmail. Of course, Gmail being popular you've probably already checked the assertion of many people claiming to have Gmail logins, so you already have the Gmail key cached, and can verify the assertion without any http requests to anywhere. Right now, Gmail does NOT implement browserid, so the assertion which you receive will be that jo@gmail.com is vouched for by the mozilla browserid service, so you will end up checking the URL you've hard coded. But if it's hard coded we can't proceed to the next stage, which is the distributed promise of browserid. AND, it puts lets less pressure on the likes of Gmail to implement browserid because no one will be checking gmail.com/.well-known/browserid.
- sergiotapia 14y agoI see what you mean now. I understand, but don't know how I could fix this. _Can_ this be fixed with the current state of Persona? Specifically: >Gmail key cached, and can verify the assertion without any http requests to anywhere. Would love to read some example code if you have some. Thanks!
- minikomi 14y agoWow, that's a lot of code! A simple as anything go example: https://gist.github.com/minikomi/4563344 https://gist.github.com/minikomi/4563344
- sergiotapia 14y agoIt's pretty much the same code strewn about a single file. I wouldn't say it's much fewer lines of code.
- minikomi 14y agoFair enough! I'm ignorant as to how ASP.Net works, so it looked like a lot of scaffolding.