Is it possible to add a hash to a shared URL?

22 views
Skip to first unread message

Troy Farrell

unread,
Aug 24, 2020, 11:29:14 PM8/24/20
to Sandstorm Development
I would like to share a grain with a hash in the URL.  The idea is that the grain can use the hash to bring the user to the exact part of the application which pertains to them.  It could also store a session identifier, for example.  I see that grains allow for deep linking:


Is there a way to do this with sharing?  The documentation does not look promising:

https://docs.sandstorm.io/en/latest/developing/path/#helping-the-user-share-access

I could abuse the permissions system to do this, if I knew what I wanted to direct the user to in advance, but I'd rather not.

Thanks!
Troy

Ian Denhardt

unread,
Aug 28, 2020, 11:18:00 AM8/28/20
to Sandstorm Development, Troy Farrell
There's no way to do this currently. Want to open an issue about it?

-Ian

Quoting Troy Farrell (2020-08-24 23:29:14)
> --
> You received this message because you are subscribed to the Google
> Groups "Sandstorm Development" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to [1]sandstorm-de...@googlegroups.com.
> To view this discussion on the web visit
> [2]https://groups.google.com/d/msgid/sandstorm-dev/4784a2cf-f909-43a0-b
> a45-cce041318099n%40googlegroups.com.
>
> Verweise
>
> 1. mailto:sandstorm-de...@googlegroups.com
> 2. https://groups.google.com/d/msgid/sandstorm-dev/4784a2cf-f909-43a0-ba45-cce041318099n%40googlegroups.com?utm_medium=email&utm_source=footer

Kenton Varda

unread,
Aug 29, 2020, 1:38:08 PM8/29/20
to Ian Denhardt, Sandstorm Development, Troy Farrell
Actually, you can totally add a path and a hash to the end of a sharing link.

For example if you have a sharing link like this:


You can add /foo/bar#baz on the end:


And then the grain iframe, when it opens, will be navigated to /foo/bar#baz (under the grain's random hostname).

-Kenton

To unsubscribe from this group and stop receiving emails from it, send an email to sandstorm-de...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sandstorm-dev/159862787320.6519.17117296868612779950%40localhost.localdomain.

Troy Farrell

unread,
Aug 29, 2020, 9:24:55 PM8/29/20
to Sandstorm Development
Kenton, you're right.  You can add a path and a hash to a sharing link.  I would like for the grain to do this, when it pops the sharing dialog.  I don't intend for the end-user to have to do this manually.  I get that the sharing dialog is sharing the grain capability (at some level of permission), but in my context, the user wants to share the capability for the grain and the value in the hash at the same time.

Troy Farrell

unread,
Sep 3, 2020, 11:23:22 PM9/3/20
to Sandstorm Development
Issue created: https://github.com/sandstorm-io/sandstorm/issues/3428

Please provide feedback regarding postMessage arguments.

Troy Farrell

unread,
Jan 25, 2021, 10:38:59 PM1/25/21
to Sandstorm Development
In case anyone is reading this thread later, it is now possible to add a hash to a shared URL.  Documentation:

Reply all
Reply to author
Forward
0 new messages