-
Notifications
You must be signed in to change notification settings - Fork 9
Handle specific DOMException when dandiarchive is hosted in an iframe #745
Comments
Strangely enough, I don't see |
It looks like girder-oauth-client does makes use of I'm a bit confused, what does embedding the page into an iframe accomplish? |
so to answer the
make visitors of "my" OHBM booth be able to visit DANDI. A workaround could be to point to https://www.dandiarchive.org/ instead but still, they could get to https://gui.dandiarchive.org/#/ and get similar kaboom. IMHO website must not crash completely under such circumstances. It is ok if site disallows some operations though (e.g. to login if localStorage is needed). |
Thanks for the extra information, @yarikoptic. Does the crash happen specifically when trying to log in? Or does it always happen upon visiting the page at all? |
That's a great question/point -- I forgot to realize that I was already logged in! so I logged out, reloaded booth page, followed the links again -- the same story. so I guess it happens regardless of either I am logged in or not -- I guess that localStorage (instead of some not-shared among "sessions") is used to check if I am logged in or not. |
Then I think we can add logic that catches this condition and changes or removes the login button, since in an iframe that feature is not supported. Then the default situation is to be in "read-only mode" for new visitors. (I am not sure what the situation will be for logged-in visitors; I suspect they will also be in the same "read-only" mode.) |
sounds good to me @waxlamp , thanks! |
I filed a PR to hide the login button when the page is in an iframe (#750).
Everything works as it should if a user is logged in already, so I didn't make them go into read-only mode. |
This turned out to be an issue with third party cookies not being enabled. Once enabled, the exception no longer occurs. |
visiting https://dandiarchive.org which forwards to web ui, if page is embedded within iframe (trying to prepare for the virtual OHBM 2021 booth) leads to
so the question is either we need access to the entire
Window
or it could be avoided?The text was updated successfully, but these errors were encountered: