-
Notifications
You must be signed in to change notification settings - Fork 67
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
Allow unauthenticated users to view links #11
Comments
@pauldraper thank you for creating this issue! So would you 1) want anonymous users to be able to use any go link in your instance or 2) want anonymous users to be able to use just the go links you yourself create? If the former, the quickest way to hack this in would be to populate the user email/org in the redirect logic if none is otherwise set: 92f2aa7 |
Yes (1) |
Got it, thank you! We'll consider adding a config option to allow anyone to follow the go links in an instance. |
Ahoy! I'd like the same thing and would be willing to take a look, if you think this could be a good starter project for a new contributor. |
@flancian awesome! We'd welcome a contribution that makes this configurable. Since Trotto by default is a multi-tenant application, go links stored in Trotto are associated with an "organization". Authenticated users are also associated with an organization, which is of course what controls which go links they can access and what organization the go links they create are associated with. If unauthenticated users are to be able to use go links, there needs to be some mechanism for determining what organization to look up the link in. I suspect that in the great majority of cases, people managing their own instance of Trotto who want to allow open access only care about one organization (their own), so I think for the first cut of this, there can simply be a way to specify a single organization that should support open redirects. The configurations entry could be something like this: In
where So to add this feature, I'd suggest a cleaner version of the hack I shared before:
If the link doesn't exist, I believe the unauthenticated user will be redirected to create the link and then redirected to the signin page, which I think is fine behavior for a start. Of course, feel free to suggest a better implementation! |
Yes. Thank you for your suggestions. |
@pauldraper thank you for affirming that, and you're welcome! |
Thank you for the thorough description! ETA for tackling this: next weekend (June 6-7). Feel free to grab if you need this sooner, but I'm happy to give it a shot. |
@flancian you're welcome, and the ETA sounds great! Don't hesitate to ask for help. |
Hi! I am looking to do an open resolver as well. Was this implemented already? |
Hi @stet! This hasn't been implemented, but as a quick way to make it work, you could update the go link router to always set Trotto is focused on private shortlinks for teams, so this isn't a priority use case to support, but happy to help you hack it in. |
Trying open links as in trotto#11
Still trying open links as in trotto#11
@isviridov sure thing, check out 4c5a3e8. You'd replace |
Thank you, that works! I think ideal (but more involved) behaviour would be to to mimic Google Short Links - that is to have a per-link "public" flag; |
@isviridov glad it's working for you! Agreed: If we add this feature, it will be along those lines. |
My links aren't private.
I'd like anyone at my organization to be able to use them without logging in.
The text was updated successfully, but these errors were encountered: