33872

TYPO3 felogin redirect to referer

Question:

I'm using TYPO3 7.6 LTS with the Systemextension felogin. Everything works fine. FE-Users use a login to visit my website.

Now, I want to send a link via e-mail to some users - like a deeplink, f.e. example.org/index.php?id=123. They should click the URL (pid=123), FE-login (pid=1) and TYPO3 should redirect to page 123.

I thought I'm using <strong>referer</strong> but it's not working? RSA is still working fine. I use the standard template from Ext:felogin.

Did I forgot something?

My Typoscript:

config.typolinkLinkAccessRestrictedPages = 1 config.typolinkLinkAccessRestrictedPages_addParams = &referer=###RETURN_URL### plugin.tx_felogin_pi1 { storagePid = 27,15 #templateFile = EXT:myext/Resources/Private/Extensions/Felogin/Templates/FrontendLogin.html showForgotPasswordLink = 1 #showPermaLogin = forgotLinkHashValidTime = 12 newPasswordMinLength = 4 ### redirect options redirectMode = referer redirectFirstMethod = GET redirectPageLogin = 2 redirectPageLoginError = 1 redirectPageLogout = 1 # disable redirect with one switch redirectDisable = # Show logout form direct after login showLogoutFormAfterLogin = 0 }

Flexform: nothing! Everything via TS, but it won't work ...

Frontend HTML:

<form action="/" target="_top" method="post" onsubmit="; return true;"> ... <div class="felogin-hidden"> <input type="hidden" name="logintype" value="login" /> <input type="hidden" name="pid" value="15,27" /> <input type="hidden" name="redirect_url" value="" /> <input type="hidden" name="tx_felogin_pi1[noredirect]" value="0" /> </div>

Answer1:

Just specify the redirectFirstMethod Methods. This feature requires the GETvar "referer" to be set to the page you want the user to return to after login. For more detalis reffere this link <a href="https://wiki.typo3.org/Felogin" rel="nofollow">felogin</a>

plugin.tx_felogin_pi1 { redirectMode = referer redirectFirstMethod = GET } config.typolinkLinkAccessRestrictedPages = 1 config.typolinkLinkAccessRestrictedPages_addParams = &referer=###RETURN_URL###

Answer2:

As mentioned in the <a href="https://docs.typo3.org/typo3cms/extensions/felogin/Examples/Index.html" rel="nofollow">FElogin manual</a>, the FElogin extension cannot handle deep links by itself:

<blockquote>

If visitors will directly enter the URL of an access restricted page they will be sent to the first page in the rootline to which they have access. Sending those direct visits to a login page is not a job of the felogin plugin, but requires a custom page-not-found handler.

</blockquote>

A custom page-not-found handler is for example the extension <a href="https://extensions.typo3.org/extension/pagenotfoundhandling/" rel="nofollow">'pagenotfoundhandling'</a>.

Once you have installed the extension, go to the extension settings and set the UID of your login form page as 'Standard 403 Page' and save.

Now, whenever a user goes to an access-restricted page using a deeplink, he will be redirected to the login page - however the URL will remain as the URL of the deeplink. As a result the user is redirected to the correct page after login.

Credit to <a href="https://stackoverflow.com/users/2683462/bharat-parmar" rel="nofollow">Bharat</a> for originally coming up with this solution in another <a href="https://stackoverflow.com/a/32697174/5726546" rel="nofollow">thread</a>.

Recommend

  • Typo3 Indexed Search Local_Lang path
  • Creating a Service Fabric cluster using resource manager template
  • Best way to paste table from Excel to PowerPoint (keeping source formatting)
  • Reset screen point to the top of screen in Windows & Linux console
  • Which Regular Expression flavour is used in Python?
  • Loop over multiple file extensions from bash script
  • How can Chrome extensions basically cURL other pages?
  • Cannot access vm using GCloud Compute
  • Can I read my app extension's info.plist in my host app?
  • Post binary data cross domain in javascript
  • How do I handle options in a packaged Chrome App?
  • Google Contacts API asp.net settings and authorization token
  • How do you access podcasts in WP7?
  • Heroku not using the specified Ruby 1.9.3
  • GotoBLAS error when installing matplotlib with pip in a virtualenv on debian wheezy
  • Escape double quotes within double quotes
  • How to allow inbound calls in pjsip and Asterisk 13?
  • Using Word2vec with Tensorflow on Windows
  • androidx android.support.v4.app.INotificationSideChannel$Stub
  • Why am I getting an error in my ASP.NET Core SQL Server Express Connection String?
  • javascript XSLT nodes, selecting the first of a group (merge-like)
  • Flask-Restful error: “as_view” method not inherited
  • How to record a JNLP/ Java Web Start application with JMeter
  • Visual Studio 2008 and JavaScript brackets formatting
  • Firefox extension testing and developing - I'm confused
  • How do I create an image and save it for later to draw as texture in XNA?
  • How to make nicEditor snaplet? (Several questions)
  • composer dependency stating in doesn't have php-xsl
  • goJS dropdown remove items
  • What is the equivalent of Android permissions in iOS development? [duplicate]
  • jersey/tomcat Description The origin server did not find a current representation for the target res
  • Bash if statement with multiple conditions
  • JBoss External Properties Files in Classpath
  • How to use JavaScript to determine whether a file exists in a directory?
  • why do I get the error when installing the gem 'pg'? [duplicate]
  • Javascript + PHP Encryption with pidCrypt
  • Unanticipated behavior
  • Getting Messege Twice Using IMvxMessenger
  • How can i traverse a binary tree from right to left in java?
  • How can I use threading to 'tick' a timer to be accessed by other threads?