I’m trying to embed the Speckle viewer in an iframe inside my app. The stream is from a private workspace, and I’m facing some issues.
When I embed the iframe, it shows a login popup.
I’d like to avoid this by using a auth token or some kind of silent authentication — is that possible?
When I try logging in through the popup, I get this error in the browser console:
csharp
CopyEdit
[nuxt] error caught during app initialization Bb: You are not logged in to this server
at wM (entry.DjPRcHqh.js:21:7189)
...
I think it might be related to how iframes handle sessions or cookies?
If anyone knows how to embed the viewer from a private workspace without running into login issues, please let me know. Happy to share more info if needed.
There isn’t a means of sharing an iframe with authentication and it not be a security risk.
Link shared projects would end up being equally secure/insecure to the point where the “contract” is at least explicit about expectations of security.
If a viewer of private projects is critical for you there are means of doing so with our opensource JavaScript package and your own custom development.
I’ve tried using the js library and was able to successfully connect to a private project, that part’s working great. However, I noticed that the default viewer controls (like component selection, and the sidebar with parameters/properties that open after selecting) aren’t included out of the box.
Is there a ready-made option or configuration to enable those UI controls, similar to what’s available in the embedded viewer via iframe? I’d love to provide the same level of interactivity.