nextcloud / nextcloud/registration
Preserve redirect_url during registration
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 147
- Forks
- 83
- Avg merge
- 1d 2h
- Merged PRs (30d)
- 9
Description
Steps to reproduce
- We use a Nextcloud app giving access to public ressources with invite links while requiring registration / login.
- Users can get the link e.g. by a QR code
-
- If the users log in, it's fine, they are being redirected to the correct app and ressource
- If the users press the reqistration button on the login-screen, the
redirect_urlgets lost
Expected behaviour
We are looking for a way to preserver redirect_url from the login screen for the registration process.
Actual behaviour
redirect_url is simply removed by anchor elements.
Possible implementation
1. Use as URI parameter as in login
In our use case, we do not verify Emails (waiting for #301 to fully get rid of it) and users are redirected to the dashboard immediately after their registration.
If would be easy to add the current page's return_url to the href of the big Registration-button on the login screen and preserving it on every next navigation.
At the last registration step, the redirect_url might be read and in case it's present, redirect the just registered user to.
2. Store as local property
Pressing the Registarion-button on the login-screen might trigger the frontend to save the redirect_url in local storage. In this case, the newly opened tab from the registration verification link can know the proper redirect_url too.
3. Store it (No!)
I do not like this option for privacy reasons and would not recommend to implement it but for transparency, I tell it anyway: The redirect_url could be stored on the server to support redirect even in case you open the verification link on another device. This would be an immense privacy hole.
Server configuration
Really doesn't matter. It's a feature request and not a bug.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the login-screen registration link and the registration flow that receives or drops redirect_url. Compare how redirect_url is handled during login and registration, then resolve which persistence approach meets the cross-navigation behavior without introducing the privacy concerns described; done means registered users return to the original resource.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- authentication
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100