【发布时间】:2020-04-16 12:46:20
【问题描述】:
您好,我正在尝试从我的 react 应用程序访问 google drive,当我登录时,会出现 iframe 并显示“开发人员密钥无效”。我正在使用谷歌驱动库react-google-picker。
我在浏览器控制台中收到类似 Failed to execute 'postMessage' on 'DOMWindow': The target origin provided ('https://docs.google.com') does not match the recipient window's origin ('http://localhost:3000') 的消息。
我不明白为什么它说The target origin provided ('https://docs.google.com'),我在谷歌开发者控制台中输入http://localhost:3000 作为Javascript 原始网址。是 iframe 的问题吗?
【问题讨论】:
标签: reactjs iframe google-drive-api google-drive-picker