# TextureLoader doesn't work on iphone only (security ?)

**URL:** <https://discourse.threejs.org/t/textureloader-doesnt-work-on-iphone-only-security/18614>\
**Category:** Questions\
**Tags:** texture-loader, security\
**Created:** [September 11, 2020, 12:22pm UTC](https://discourse.threejs.org/t/textureloader-doesnt-work-on-iphone-only-security/18614 "2020-09-11T12:22:36Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![antelius](https://avatars.discourse-cdn.com/v4/letter/a/3ec8ea/32.png) [@antelius](https://discourse.threejs.org/u/antelius)\
**Post date:** [September 11, 2020, 12:22pm UTC](https://discourse.threejs.org/t/textureloader-doesnt-work-on-iphone-only-security/18614/1 "2020-09-11T12:22:36Z")

</div>

Hi all,  
i work on a web app with shiro as securitye. The behavior is simple. The app ask a user/pwd on load the first page and after, it work for all file and image during the session. Now, i want to include three js page in my app but i discovered that it doesn’t work on iphone (only). After a lot of test, it seems to be due to a security probleme. the TextureLoader seems to need a new connection with user/pwd to work. I read a lot of discussion about “credentials” but didn’t found the solution. Is there a way to configure the textureLoader to work ??

---

<div class="post-metadata">

**Author:** ![antelius](https://avatars.discourse-cdn.com/v4/letter/a/3ec8ea/32.png) [@antelius](https://discourse.threejs.org/u/antelius)\
**Post date:** [September 11, 2020, 3:00pm UTC](https://discourse.threejs.org/t/textureloader-doesnt-work-on-iphone-only-security/18614/2 "2020-09-11T15:00:06Z")

</div>

hi, I discovered that the previous version of three js (without module) work ! So, i think that it’s a problem security using module. Somebody have an idea to help me ?  
thanks a lot !

---

<div class="post-metadata">

**Author:** ![antelius](https://avatars.discourse-cdn.com/v4/letter/a/3ec8ea/32.png) [@antelius](https://discourse.threejs.org/u/antelius)\
**Post date:** [September 11, 2020, 6:24pm UTC](https://discourse.threejs.org/t/textureloader-doesnt-work-on-iphone-only-security/18614/3 "2020-09-11T18:24:45Z")

</div>

Hi all,

Just for your information and to help every body with this problem, i found the solution.  
There two different parameters to add to solve this problem.  
First, add _ **crossorigin="use-credentials"** _ in the to solve the problem for the module and secondly, add _loader.crossOrigin= “use-credentials”;_ to the TextureLoader to solve the loading of the picture.  
hope it will help somebody…  
Thanks to all !
