Task #104694
closed[DOCS] Document how to implement a redirect to the restricted page after successful login
100%
Description
Provide documentation to implement a redirect to the restricted page after a successful frontend login¶
Problem description¶
A common use case that a frontend user might expect is that when a frontend user (not logged in yet) tries to access a restricted page, then the user should be redirected to the login page. This is already covered in the documentation.
But after the login you may want to be redirected to the page from where you got initially redirected to and not to the page that you can select in the frontend login plugin. This is not yet covered by the documentation (https://docs.typo3.org/c/typo3/cms-felogin/main/en-us/Examples/Index.html#login-and-back-to-original-page).
I will provide the documentation that this sentence is referring to (Sending those direct visits to a login page is not a job of the felogin plugin, but requires a custom page-not-found handler).
Connections to Torbens issue¶
Torben Hansen (https://forge.typo3.org/issues/101252) provided a not yet merged (as of the time of this writing) solution for this but in another manner than I want to document about.
He suggests to use the RedirectLoginErrorHandler class in terms of a LoginRedirect errorHandler, but I will document the RedirectLoginErrorHandler in the use of custom PHP 403 errorHandler in the error handling (site settings) which a backend user can provide by its own.
I tried to implement the other way (RedirectLoginErrorHandler class in terms of a LoginRedirect errorHandler) but this didn't work out in a TYPO3 instance with version v11.5.37 - after a successful login we ran into the 403 (The page did not exist or was inaccessible. Reason: ID was not an accessible page) error again. Garvin and me therefore tried the other way and succeeded with small modification of the code in the RedirectLoginErrorHandler class.
Updated by Sandra Erbel 3 months ago
- Related to Feature #101252: PageErrorHandler for 403 errors with redirect option to login page added
Updated by Garvin Hicking 3 months ago
- Description updated (diff)
- Status changed from New to Accepted
- Assignee set to Garvin Hicking
- Target version set to next-patchlevel
Updated by Garvin Hicking 3 months ago
- Assignee changed from Garvin Hicking to Sandra Erbel
Sandra will try to move this PR from:
https://github.com/TYPO3-CMS/felogin/pull/1
as a proper gerrit patch to the docs :)
Updated by Gerrit Code Review 3 months ago
- Status changed from Accepted to Under Review
Patch set 1 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/85817
Updated by Gerrit Code Review 3 months ago
Patch set 2 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/85817
Updated by Gerrit Code Review 3 months ago
Patch set 3 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/85817
Updated by Gerrit Code Review 3 months ago
Patch set 4 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/85817
Updated by Gerrit Code Review 3 months ago
Patch set 5 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/85817
Updated by Gerrit Code Review 3 months ago
Patch set 6 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/85817
Updated by Gerrit Code Review 3 months ago
Patch set 7 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/85817
Updated by Gerrit Code Review 3 months ago
Patch set 8 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/85817
Updated by Gerrit Code Review 3 months ago
Patch set 9 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/85817
Updated by Gerrit Code Review 3 months ago
Patch set 10 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/85817
Updated by Gerrit Code Review 3 months ago
Patch set 11 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/85817
Updated by Gerrit Code Review 3 months ago
Patch set 12 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/85817
Updated by Gerrit Code Review 3 months ago
Patch set 13 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/85817
Updated by Gerrit Code Review 3 months ago
Patch set 14 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/85817
Updated by Gerrit Code Review 3 months ago
Patch set 15 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/85817
Updated by Gerrit Code Review 3 months ago
Patch set 16 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/85817
Updated by Gerrit Code Review 3 months ago
Patch set 17 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/85817
Updated by Gerrit Code Review 3 months ago
Patch set 18 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/85817
Updated by Sandra Erbel 3 months ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 59b7da06ca9f2c47060c843286a5cb62cab63be6.
Updated by Gerrit Code Review 3 months ago
- Status changed from Resolved to Under Review
Patch set 1 for branch 12.4 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/85876
Updated by Gerrit Code Review 3 months ago
Patch set 1 for branch 11.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/85877
Updated by Sandra Erbel 3 months ago
- Status changed from Under Review to Resolved
Applied in changeset 9b167768bb078d00b09a7452b2d76e65b6232587.