Skip to content
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

set withCredentials for other loaders #4085

Merged
merged 1 commit into from
Feb 1, 2023
Merged

set withCredentials for other loaders #4085

merged 1 commit into from
Feb 1, 2023

Conversation

elalish
Copy link
Collaborator

@elalish elalish commented Feb 1, 2023

Fixes #4083

This is a pretty straight-forward fix, but I don't have a great way to test it. @robertsLando I'd appreciate it if you can verify this is working for you once it's in.

@elalish elalish self-assigned this Feb 1, 2023
@elalish elalish merged commit 8d63780 into master Feb 1, 2023
@elalish elalish deleted the credentials branch February 1, 2023 18:06
@robertsLando
Copy link
Contributor

@elalish Thanks for this but I just tested v3.0.0 and it's still not working 😢 Keep getting 403 error, this only happens with skybox image BTW, poster and model src are loaded with credentials correctly

@elalish
Copy link
Collaborator Author

elalish commented Feb 2, 2023

Hmm, can you post a repro link?

@robertsLando
Copy link
Contributor

@elalish I wish but I would need a repro with a backend to also authenticate the client, it's not that easy to create... I checked the code and your changes looks good I have no clue what it does differently, let me try to debug it on my end. Any tips?

@robertsLando
Copy link
Contributor

This is the call stack when skybox image is loaded:

Schermata da 2023-02-03 11-20-43

@robertsLando
Copy link
Contributor

I think you should use loader.setWithCredentials(value) function instead of directly set the property, seems that setting it in this way the value isn't persisted to the parent instance, when it comes to the parent withCredentials is false but is true in hdrLoader and ldrLoader instances

@elalish
Copy link
Collaborator Author

elalish commented Feb 3, 2023

Ah, good call! That's just a typo on my part, but I thought the @types/three would catch that kind of thing for me. Okay, should be an easy fix. Really appreciate the debug.

@elalish elalish mentioned this pull request Feb 3, 2023
@robertsLando
Copy link
Contributor

robertsLando commented Feb 6, 2023

Perfect, Patch release please? :)

@elalish
Copy link
Collaborator Author

elalish commented Feb 7, 2023

Yeah, probably - got a few other things to fix first.

JL-Vidinoti pushed a commit to vidinoti/model-viewer that referenced this pull request Apr 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants