Comments (7)
Hm, I'm not seeing warden in your Gemfile? There is even padrino-warden although I haven't tested it. You can find a post about it under https://workaround.org/articlehow-to-use-user-authentication-in-your-padrino-apps-with-padrino-warden/.
from padrino-contrib.
I know, already read this article, thank you. I'm using padrino-warden (0.20.2), warden (>= 0.10.3). Padrino contrib autolocales make /sessions/login path unavailable...
from padrino-contrib.
Can you make a reproducible Github repo? Something we can clone and immediately see the failure.
from padrino-contrib.
@adam12 is right, this would make helping you much easier.
from padrino-contrib.
There it is ;-) See https://github.com/happycze/autolocales
Shown autolocale issues:
- warden authentication failure fail (create user first, then enter invalid credentials which results in "empty screen")
- route named parameters fail on :lang key/symbol
If you disable autolocales, everything works as expected...
from padrino-contrib.
Thanks for the reproducable app.
route named parameters fail on :lang key/symbol
I believe this is expected, as :lang
is reserved for the locale name. We can't have duplicate param names.
warden authentication failure fail (create user first, then enter invalid credentials which results in "empty screen")
The empty screen is a 405 error. It's the result of the fail!
call in your authentication file. I believe it's asking the Padrino app to handle the authentication failure but the AutoLocale middleware is mangling the path Padrino needs.
You can easily get something on the screen by using something like this in your app.rb
file.
set :warden_failure_app, proc {
->(env) { [200, {}, ["Foobar"]] }
}
Unfortunately, I think you're hitting this bug #5 which has no fix.
from padrino-contrib.
Thank you for workaround, seems to work fine ;-)
I checked source code and you guys are right, :lang
is reserved, its a pity, that there is no doc on this (at least i didn't find anything)
from padrino-contrib.
Related Issues (13)
- Setup a plugin for use with async_sinatra (async_padrino) HOT 3
- Do something like the asset pipeline in rails 3.1 HOT 13
- errors with Padrino::Contrib::Helpers::AssetsCompressor HOT 8
- Find by field with locale HOT 1
- Padrino::Contrib::AutoLocale doesn't work with some controllers HOT 3
- Exception Notifier ignores delivery_method
- Unexpected error while processing request: undefined method `new' HOT 4
- Suggestion: Set default layout for exceptions to :application HOT 2
- New release HOT 3
- Usage documentation for breadcrumbs are missing HOT 4
- undefined method 'path=' on start HOT 4
- breadcrumbs HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from padrino-contrib.