Today we learnt about Sorcery, which is a nifty Ruby gem that does user authentication for us. Up till now we’ve always manually done it using bcrypt, and oh my does Sorcery make it so much easier (and more secure). Not only that, but it also takes care of user activation, sessions management, as well as cookie management. Needless to say we’ll be using it a lot going forward.
After sorcery, we dived a bit into name spacing and how we can use it to build a backend view for admins using a web app. Basically, it means creating a dashboard for administrators that’s separated from what users are able to access. A user for example can edit his account at : http://www.example.com/users/mfarazi. A name space basically routes all that for admins and provides them whatever super powers you code for them. Then they’d be able to access other users and do whatever to them by accessing: http://www.example.com/admin/users/index.
All that aside, we’ve been kicking ass with our crowd funder app, and are really excited with it. We decided to skip Sorcery for now since we already wrote a user model via bcrypt. Now we can at least deliver a functioning app first, then do the fun stuff like Sorcery later.