Support the ongoing development of Laravel.io →
Authentication Session Installation

Hi,

Let's say I have a basic Laravel web application, like the one from the Intermediate Task List quickstart tutorial. Assume that some pages require the user to be authenticated, like tasks/13/ which displays task #13.

Now, say I want to insert an hyperlink to this page in a MS Word or MS Excel document. When I click on the hyperlink example.com/tasks/13 from the MS document, my default browser shows the login page of my application. When I login, I get redirected to the standard default after-login page (and not the page from the initial hyperlink).

This seems to be due to the fact that MS internally "opens" the link (within an internal sandbox browser), retrieves the answer and then displays this answer in the default browser; see superuser.com. So somehow, the session is not passed along and Laravel cannot know where the user initially wanted to go.

Can I build a work around ? Like place some kind of hidden field within the login page so that my application knows where to redirect the user after login without using the session ?

Thanks,

Last updated 3 years ago.
0

Using token based authentication should work https://gistlog.co/JacobBennett/090369fbab0b31130b51

0

Sign in to participate in this thread!

Eventy

Your banner here too?

citionzeno citionzeno Joined 29 Jul 2016

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2025 Laravel.io - All rights reserved.