Coder Social home page Coder Social logo

Comments (4)

mikker avatar mikker commented on June 13, 2024 1

I've created a feature request issue in #206

from passwordless.

andreaskundig avatar andreaskundig commented on June 13, 2024

In the stacktrace, with_locale goes through two passwordless methods.

mailer.sign_in tries to build a magic_link with context.url_for and fails

passwordless/context.rb:42:in `url_for'

passwordless/mailer.rb:16:in `sign_in'

actionpack (7.1.2) lib/action_dispatch/journey/formatter.rb:44:in `path'
actionpack (7.1.2) lib/action_dispatch/routing/route_set.rb:854:in `url_for'
actionpack (7.1.2) lib/action_dispatch/routing/url_for.rb:184:in `full_url_for'
actionpack (7.1.2) lib/action_dispatch/routing/url_for.rb:174:in `url_for'
actionpack (7.1.2) lib/action_dispatch/routing/route_set.rb:537:in `url_for'
passwordless (1.2.0) lib/passwordless/context.rb:42:in `url_for'
passwordless (1.2.0) app/mailers/passwordless/mailer.rb:16:in `sign_in'
actionpack (7.1.2) lib/abstract_controller/base.rb:224:in `process_action'
actionpack (7.1.2) lib/abstract_controller/callbacks.rb:259:in `block in process_action'
activesupport (7.1.2) lib/active_support/callbacks.rb:121:in `block in run_callbacks'
actiontext (7.1.2) lib/action_text/rendering.rb:23:in `with_renderer'
actiontext (7.1.2) lib/action_text/engine.rb:69:in `block (4 levels) in <class:Engine>'
activesupport (7.1.2) lib/active_support/callbacks.rb:130:in `instance_exec'
activesupport (7.1.2) lib/active_support/callbacks.rb:130:in `block in run_callbacks'
activesupport (7.1.2) lib/active_support/callbacks.rb:141:in `run_callbacks'
actionpack (7.1.2) lib/abstract_controller/callbacks.rb:258:in `process_action'
actionpack (7.1.2) lib/abstract_controller/base.rb:160:in `process'
actionmailer (7.1.2) lib/action_mailer/rescuable.rb:29:in `block in process'
actionmailer (7.1.2) lib/action_mailer/rescuable.rb:21:in `handle_exceptions'
actionmailer (7.1.2) lib/action_mailer/rescuable.rb:28:in `process'
actionview (7.1.2) lib/action_view/rendering.rb:40:in `process'
actionmailer (7.1.2) lib/action_mailer/base.rb:658:in `block in process'
activesupport (7.1.2) lib/active_support/notifications.rb:206:in `block in instrument'
activesupport (7.1.2) lib/active_support/notifications/instrumenter.rb:58:in `instrument'
activesupport (7.1.2) lib/active_support/notifications.rb:206:in `instrument'
actionmailer (7.1.2) lib/action_mailer/base.rb:657:in `process'
actionmailer (7.1.2) lib/action_mailer/message_delivery.rb:136:in `block in processed_mailer'
<internal:kernel>:90:in `tap'
actionmailer (7.1.2) lib/action_mailer/message_delivery.rb:135:in `processed_mailer'
actionmailer (7.1.2) lib/action_mailer/message_delivery.rb:124:in `deliver_now'
passwordless (1.2.0) lib/passwordless/config.rb:47:in `block in <class:Configuration>'
passwordless (1.2.0) app/controllers/passwordless/sessions_controller.rb:34:in `create'
actionpack (7.1.2) lib/action_controller/metal/basic_implicit_render.rb:6:in `send_action'
actionpack (7.1.2) lib/abstract_controller/base.rb:224:in `process_action'
actionpack (7.1.2) lib/action_controller/metal/rendering.rb:165:in `process_action'
actionpack (7.1.2) lib/abstract_controller/callbacks.rb:259:in `block in process_action'
activesupport (7.1.2) lib/active_support/callbacks.rb:121:in `block in run_callbacks'
i18n (1.14.1) lib/i18n.rb:322:in `with_locale' 

from passwordless.

mikker avatar mikker commented on June 13, 2024

Yes, I believe this is due to how passwordless builds its urls. I'm afraid we don't support scoped urls like that currently.

It is not something I have the bandwidth to add support for atm, but I'll gladly review and possibly include a nice PR if someone is up for the challenge.

from passwordless.

mikker avatar mikker commented on June 13, 2024

@andreaskundig If you need this url structure, you can set up your own routes and possibly controllers/mailers/routes. Use the built-in ones as a starting point. Will take a bit of work but it's possible.

from passwordless.

Related Issues (20)

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.