# IndexedDB in iframe of ionic for iOS: Security error

**URL:** <https://forum.ionicframework.com/t/indexeddb-in-iframe-of-ionic-for-ios-security-error/132682>\
**Category:** ionic-v3\
**Created:** [June 12, 2018, 6:18am UTC](https://forum.ionicframework.com/t/indexeddb-in-iframe-of-ionic-for-ios-security-error/132682 "2018-06-12T06:18:35Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![gregoireg](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/gregoireg/32/112501_2.png) [@gregoireg](https://forum.ionicframework.com/u/gregoireg)\
**Post date:** [June 12, 2018, 6:18am UTC](https://forum.ionicframework.com/t/indexeddb-in-iframe-of-ionic-for-ios-security-error/132682/1 "2018-06-12T06:18:35Z")

</div>

I have an iframe in an Ionic 2 application. This iframe (different origin but I control both sides) uses indexedDB. I receive the error “IDBFactory.open() called in an invalid security context” when opening the database in the iframe on iOS. Note that it works on Android or on the web interface.

Is there anything I can do to make this work? I would like to avoid re-developing everything and just glue so that I can use my existing code in the iframe.

---

<div class="post-metadata">

**Author:** ![mhartington](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/mhartington/32/137757_2.png) [@mhartington](https://forum.ionicframework.com/u/mhartington)\
**Post date:** [July 19, 2021, 9:32pm UTC](https://forum.ionicframework.com/t/indexeddb-in-iframe-of-ionic-for-ios-security-error/132682/2 "2021-07-19T21:32:22Z")

</div>


