Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Redirect to an Arbitrary Shortened URL #121

Closed
davidgtonge opened this issue Nov 14, 2020 · 6 comments · Fixed by #139
Closed

Redirect to an Arbitrary Shortened URL #121

davidgtonge opened this issue Nov 14, 2020 · 6 comments · Fixed by #139
Assignees

Comments

@davidgtonge
Copy link

I don't understand why this mode is needed?

Its also problematic having a boolean or a number as valid parameters for interact.redirect

@jricher
Copy link
Collaborator

jricher commented Nov 15, 2020

Polymorphism in the protocol is discussed as part of a larger design question in #6

The short redirect was suggested in early WG (or even pre-WG) design discussions to allow the client to request a redirect URI with limitations on its final length, to facilitate the client communicating it to the user in limited ways. There are still a lot of questions about this including whether it stays switched like this and what the error/failure modes would be, #53

@davidgtonge
Copy link
Author

Thanks for the explanation, it would be good to link this to a documented use case - I couldn't see one in the wiki.

I'll leave a comment in #6 as I think that a high level polymorphism is a good fit for the protocol, but it should be used sparingly. I see no reason for it to be used here.

@fimbault
Copy link
Collaborator

fimbault commented Nov 16, 2020

If we are to shorten the URL (which is a valid use case, especially if a user needs to copy paste it manually from a constrained device to some other browsing device), then it seems logical to really limit the value instead of defining an "integer indicating the maximum character length of the returned URL" (255 in the example). For the manual use case, it seems too big to be practical, and there are other conditions besides length that matter (which set of characters, entropy threshold, etc.). See for instance https://github.com/ai/nanoid (it's not the only way to do that), and its demo https://zelark.github.io/nano-id-cc/

This means we could avoid parameters, and choose a predefined setting that does the job.

image

@jricher
Copy link
Collaborator

jricher commented Nov 16, 2020

For things you expect a human to type, you should be using the user_code method with a static URL instead since it allows you to separate the human-memorable part from the URL part.

The drive for this mode was for clients that had limited capabilities in display but could still communicate something as long and complex as a URI.

For what it's worth, I personally don't think we need this mode and would be fine if we dropped this function.

@fimbault
Copy link
Collaborator

Ok makes sense.
Also think it could be dropped because it's a bit confusing.

@aaronpk
Copy link
Collaborator

aaronpk commented Nov 17, 2020

Unless there’s a specific use case this enables that we can document in the spec I would also be in favor of dropping this mode.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants