martini-contrib / oauth2

[not maintained] Allows your Martini application to support user login via an OAuth 2.0 backend.
Apache License 2.0
125 stars 47 forks source link

Handling multiple oauth authentication #32

Open emmanuelbuah opened 10 years ago

emmanuelbuah commented 10 years ago

This is more of question/suggestion than a ticket. Since the oauth func writes to the response on failure, it seems impossible to use multiple oauth/auth for a martini app since the first auth handler to fail will end the request cycle. It would be nice to provide an extra skip parameter to oauth2.LoginRequired to indicate whether it should skip on the next handler on failure or not. This will allow for chaining of multiple auth handlers (fb, google, etc)

If there is a way to chain multiple auth handlers with the current implementation, I would be happy if someone can point me to any doc/code sample.