What do you use for authentication ?

10 views
Skip to first unread message

Thibaut Barrère

unread,
Nov 16, 2009, 4:57:45 AM11/16/09
to sinatrarb
Hi!

I'm starting not one, but two sinatra apps that will totally go to
production :)

Just curious, what you guys use for simple authentication ? And for
ssl (if needed) ? Roles maybe ?

Are you more plugging in rack middlewares together, or using a sinatra
specific library ?

thanks!

Thibaut
--
http://www.learnivore.com

Nicholas Young

unread,
Nov 16, 2009, 7:35:16 AM11/16/09
to sina...@googlegroups.com
I'm currently using Authlogic, but I'm considering a move to Warden.

If you're wanting to use the former, look for the Sinatra Authlogic
Template on github. It helped me a lot.

Nicholas Young

On Nov 16, 2009, at 3:57 AM, Thibaut Barrère

Nicholas Young

unread,
Nov 16, 2009, 10:34:39 AM11/16/09
to sinatrarb
Thibaut,

I just though this might help you... I recently discovered the
Sinatra_More gem, and it's full of great stuff, including full Warden
integration. I'm in the process of transferring my Sinatra app to that
now.

http://github.com/nesquena/sinatra_more

-Nicholas

On Nov 16, 6:35 am, Nicholas Young <nicho...@nicholaswyoung.com>
wrote:

Louis-Philippe

unread,
Nov 16, 2009, 11:03:19 AM11/16/09
to sina...@googlegroups.com
Rack Middlewares may also get you a more custom and flexible solution, I find Rack::OpenID works like a charm.

2009/11/16 Nicholas Young <nich...@nicholaswyoung.com>

Harry Vangberg

unread,
Nov 16, 2009, 11:07:04 AM11/16/09
to sina...@googlegroups.com
Shameless plug, but I have this piece of middleware for authentication,
it has been getting some love lately, so it should be suited for use:

http://github.com/ichverstehe/chowder/

2009/11/16 Louis-Philippe <def...@spiralix.org>:

Nicholas Young

unread,
Nov 16, 2009, 1:19:32 PM11/16/09
to sina...@googlegroups.com
Harry,

I'm looking at Chowder - and it looks great. I've got a few questions, though.

I need to be able to add several fields to my user model, i.e. biography, email address, etc. Can I do that?

Second - can I have a user login by email and password?

Third - how expandable is it? (Say, if I wanted to add a Facebook connect library - is that easily doable?)

Thanks for your contribution!

Nicholas Young

Harry Vangberg

unread,
Nov 16, 2009, 1:25:41 PM11/16/09
to sina...@googlegroups.com
> I need to be able to add several fields to my user model, i.e. biography,
> email address, etc. Can I do that?

Whatever you put in the signup-form is passed on to your signup callback,
so that should be entirely possible.

> Second - can I have a user login by email and password?

As you can see in the examples, you do the validation logic yourself,
so threat 'login' as email or whatever you want.

> Third - how expandable is it? (Say, if I wanted to add a Facebook connect
> library - is that easily doable?)

I don't know about Facebook Connect specifically, but in general it's easy,
you might want to take a look at the OpenID-authentication. It's pretty
simple.

Nicholas Young

unread,
Nov 16, 2009, 1:25:42 PM11/16/09
to sina...@googlegroups.com, ha...@vangberg.name
Oh, and I forgot to ask, is there a decently simple way to do email validations?

Nicholas Young

Nicholas Young

unread,
Nov 16, 2009, 1:27:15 PM11/16/09
to sinatrarb
Awesome. I'm going to give it a try! -Nicholas

Nicholas Young

unread,
Nov 16, 2009, 4:36:34 PM11/16/09
to sinatrarb
Quick Q: How does one go about enabling password resets in Chowder?

On Nov 16, 12:27 pm, Nicholas Young <nicho...@nicholaswyoung.com>
wrote:

Thibaut Barrère

unread,
Nov 17, 2009, 3:53:51 AM11/17/09
to sinatrarb
Hi guys,

thanks for all the answers, awesome! I'll have a closer look at the
various options :)

cheers,

Thibaut
--
http://www.learnivore.com

Travis Bell

unread,
Nov 19, 2009, 4:25:46 PM11/19/09
to sina...@googlegroups.com
Hey Nicholas,

Did you ever figure out an easy way to reset a password with Chowder?


--
Travis Bell







--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "sinatrarb" group.
To post to this group, send email to sina...@googlegroups.com
To unsubscribe from this group, send email to sinatrarb+...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sinatrarb?hl=en
-~----------~----~----~----~------~----~------~--~---


Harry Vangberg

unread,
Nov 19, 2009, 4:28:33 PM11/19/09
to sina...@googlegroups.com
Chowder doesn't care about your model, in fact, I wrote it because I
was tired of all the authentication solutions that require a certain
schema or workflow. Stuff like password reset should be handled by
yourself.

2009/11/19 Travis Bell <travi...@gmail.com>:
> --
>
> You received this message because you are subscribed to the Google Groups
> "sinatrarb" group.
> To post to this group, send email to sina...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/sinatrarb?hl=.
>

Travis Bell

unread,
Nov 19, 2009, 4:34:34 PM11/19/09
to sina...@googlegroups.com
Thanks Harry.

Is there a library/plugin that can handle the whole meal deal? Ie. not just the framework around auth, but encrypting passwords, email verifications, password resets, etc…?


--
Travis Bell






Nicholas Young

unread,
Nov 19, 2009, 4:48:17 PM11/19/09
to sina...@googlegroups.com
Authlogic is the best that I've found yet -- but it does require some coaxing to work with Sinatra.

I actually ended up going back to Rails for this specific project, Travis -- merely because of time, nothing else. I'm just familiar with Rails, and the MVC is incredibly helpful. 

Nicholas Young
Reply all
Reply to author
Forward
0 new messages