Skip to content

Commit

Permalink
The sandbox now passes the authToken if it exists to the URLHelperwhe…
Browse files Browse the repository at this point in the history
…n loading a url
  • Loading branch information
AlexandruPopovici committed Apr 26, 2024
1 parent af8c3e1 commit 6a51d6e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/viewer-sandbox/src/Sandbox.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1338,12 +1338,12 @@ export default class Sandbox {
}

public async loadUrl(url: string) {
const objUrls = await UrlHelper.getResourceUrls(url)
const authToken = localStorage.getItem(
url.includes('latest') ? 'AuthTokenLatest' : 'AuthToken'
) as string
const objUrls = await UrlHelper.getResourceUrls(url, authToken)
for (const url of objUrls) {
console.log(`Loading ${url}`)
const authToken = localStorage.getItem(
url.includes('latest') ? 'AuthTokenLatest' : 'AuthToken'
) as string
const loader = new SpeckleLoader(
this.viewer.getWorldTree(),
url,
Expand Down

0 comments on commit 6a51d6e

Please sign in to comment.