Skip to content

Standalone Padrino authentication solution #468

Open
achiu opened this Issue Apr 11, 2011 · 27 comments
@achiu
Padrino Framework member
achiu commented Apr 11, 2011

padrino-admin has a pretty good start on this. I think it be good if we can extract that out into its own(like merb-auth) so users can swap the authentication in an out. Maybe we could have it be like Devise for Padrino/Sinatra ?

@jacquescrocker

sounds great. I think this would be awesome. I'll see if I can extract something similar to devise thats based on warden.

@nesquena
Padrino Framework member

Really excited about this idea. I would love a Devise type solution (but in the sinatra style). padrino-warden is a good start but I could see something warden based but being modular and potentially more full featured.

@pepe
pepe commented Apr 28, 2011

That would be cool!

@wayneeseguin

Most excellent and definitely needed. Being new to Padrino that was one of the first items I was looking for.
Warden integration by default would be best.

@rbq
rbq commented May 9, 2011

+1

I don't really need an authentication solution but imho the admin app would become more useful if you could create it without any auth stuff included.

@achiu achiu was assigned May 9, 2011
@DAddYE
Padrino Framework member
DAddYE commented May 9, 2011

Mmm this is pretty difficult because auth stuff is managed by:

1) account.rb # that fits each orm
2) sessions.rb # that handle Account.authenticate

So if you want to replace builtin auth the only thing to do in (99% of cases) is change only:

# account.rb
def self.authenticate
  my_own_auth
end
@rakaur
rakaur commented May 13, 2011

Shouldn't we take #384 into account, or has this gaping insecurity been addressed?

@myabc
myabc commented Jul 6, 2011

+1

@amacgregor

+1

@snowyu
snowyu commented Mar 1, 2012

What's about using the padrino-warden and porting the devise for rails to padrino?

@postmodern

This should be similar or built on-top of padrino-warden. In my app I would like to specify the User model, login/logout paths, and authentication param names.

@viacoffee

+1

@ainformatico

+1

@dariocravero
Padrino Framework member

👍 Similar: #132 #428. @lenzcom sinatra-authentication looks nice but it mixes authentication with authorisation and those should preferably be separated.

@DAddYE
Padrino Framework member
DAddYE commented Dec 29, 2012

What about if next version will come with a simple http basic auth and a couple of api to unplug it and add devise or sinatra-auth ?

@postmodern

I would support sinatra-warden. sinatra-authentication does not use warden, so I don't trust it too much. Didn't Devise go Rails only?

@dariocravero
Padrino Framework member

@DAddYE what you're proposing makes sense since it would simplify the offering and allow for better reusability. Even more, with a clear interface adding new solutions or integrating existing ones would be way easier. If it gains too much relevance we could even add them as part of the generator or put them on the plugins.

@postmodern yes, Devise is tied with Rails. Why not choosing padrino-warden instead (it's already based on sinatra-warden) and help making it better if it needs to?

@viacoffee

I think an authentication API like @DAddYE said would make sense. That way people can plug & play whatever authentication library they want. Essentially it would just be hooks that other auth libraries could use?

@ainformatico

The API sounds great, but using padrino admin auth too. I', thinking a way where they both can live together. The new awesome API can use by default the padrino admin auth, I think that means moving the admin auth templates outside the admin app, what do you think?

@postmodern

@dariocravero Oops, turns out one of my padrino projects is already using padrino-warden with dm-is-authenticatable.

@nesquena
Padrino Framework member

I've used padrino-warden without issue several times and it works really well as a basic solution. Seems like that + dm-is-authenticatable is a great combination.

@achiu
Padrino Framework member
achiu commented Dec 30, 2012

padrino-warden is what I used and what inspired me to open this issue. The difference is that instead of using the gem I duplicated the code into my app so I can make more in-depth changes. This gives me control over the paths, parameters expected, and models that are associated with authentication.
What I end up doing too is breaking out the authentication into its own 'subapp' with my other apps referencing that when authentication is needed. This felt like a nice way to make it a more 'drop-in' authentication solution that padrino can generate for you.

@ghost
ghost commented Jan 4, 2013

@dariocravero: yes, you're right. that must be a flexible aspect of such a system..

@ujifgc ujifgc was assigned Jan 6, 2014
@ujifgc ujifgc removed their assignment Feb 17, 2014
@ujifgc ujifgc modified the milestone: 1.0.0, 0.12.1 Mar 10, 2014
@nesquena nesquena modified the milestone: 1.0.0, 0.13.0 Oct 19, 2014
@nesquena
Padrino Framework member

@ujifgc I know you put some effort behind this here https://github.com/ujifgc/padrino-auth just wanted record for later review in this issue. I don't think we should release a 1.0 without completing a reasonable authentication solution and this looks like a good start.

@dariocravero
Padrino Framework member
@pchaganti

👍

@ujifgc ujifgc modified the milestone: 0.13.0 Oct 12, 2015
@nesquena nesquena modified the milestone: 0.13.1 Oct 12, 2015
@ujifgc ujifgc modified the milestone: 0.13.1 Dec 12, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.