You can see example at Galileo https://metacpan.org/source/JBERGER/Galileo-0.037/lib/Galileo/User.pm Also you can use redirect_to method from Mojolicious::Controller with refferer:

$c->redirect_to($c->req->headers->referrer);

--
С уважением,
Александр Грошев

On Чт, ноя 6, 2014 в 3:55 , mjb152 <[email protected]> wrote:
just answering my own question (slightly), I found I had to use $c->url_for to get the route which referred, and then use flash before redirecting.

I tried using stash, but it refused to work at all with redirect, flash worked fine.

On Thursday, November 6, 2014 10:10:47 AM UTC, mjb152 wrote:
I'm using Mojolicious::Plugin::Authentication and routing via bridge, as per the example below.

How can I use this construct to remember the page I was directed from, and then go back there once I'm authenticated ? And how could that handle several attempts at authentication ? (in case of wrong password)


my $auth_bridge = $r->bridge('/members')->to('auth#check');
$auth_bridge->route('/list')->to('members#list'); # only visible to logged in users
--
You received this message because you are subscribed to the Google Groups "Mojolicious" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/mojolicious.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups 
"Mojolicious" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/mojolicious.
For more options, visit https://groups.google.com/d/optout.

Reply via email to