简体   繁体   中英

Twitter Digits - Digits.init() can be called only once

I am using the Twitter Digits embeddable widget in a portal to allow users to enable Twitter Digits two factor authentication. The setup I have is exactly the same as the sample they provide: https://docs.fabric.io/web/digits/embeddable.html

The first time you hit the page where you have the twitter digits widget, everything works fine. However if from the menu you navigate to a different page and then get back to the twitter digits page I am getting the following error in the console and the iframe doesn't load.

Error: Digits.init() can be called only once

Can anyone tell me whether there is a way to clear/destroy the twitter instance and load a new one on the second try? I've had a look at their documentation but couldn't find something of the sort unfortunately.

Issue resolved. I am checking Digits.isInitialized() to check whether twitter digits is already initialized or not.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM