Giter Club home page Giter Club logo

Comments (7)

wikimatze avatar wikimatze commented on July 23, 2024

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.

happycze avatar happycze commented on July 23, 2024

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.

adam12 avatar adam12 commented on July 23, 2024

Can you make a reproducible Github repo? Something we can clone and immediately see the failure.

from padrino-contrib.

wikimatze avatar wikimatze commented on July 23, 2024

@adam12 is right, this would make helping you much easier.

from padrino-contrib.

happycze avatar happycze commented on July 23, 2024

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.

adam12 avatar adam12 commented on July 23, 2024

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.

happycze avatar happycze commented on July 23, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.