反应:Securestore在移动设备上工作。如何在Web浏览器上确保JWT安全?
Securestore
do 不在网上工作,所以我要这样做:
async function getUserDetails() {
try { //Android and Apple
const token = await SecureStore.getItemAsync('token')
const data = await axios.get(apiurl+'&JWT='+token)
console.log('using SecureStore')
} catch (err) { //Web
const token = await AsyncStorage.getItem('token')
const data = await axios.get(apiurl+'&JWT='+token)
console.log('using AsyncStorage')
}
}
因此,如果我想攻击自己的应用程序,我只使用浏览器,我将能够看到纯文本的JWT对吗?如何解决这个问题?
SecureStore
does not work on Web, so I do this:
async function getUserDetails() {
try { //Android and Apple
const token = await SecureStore.getItemAsync('token')
const data = await axios.get(apiurl+'&JWT='+token)
console.log('using SecureStore')
} catch (err) { //Web
const token = await AsyncStorage.getItem('token')
const data = await axios.get(apiurl+'&JWT='+token)
console.log('using AsyncStorage')
}
}
So if I want to attack my own app, I just use the browser, and i'll be able to see the JWT in plain text right? How to tackle this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
React Native主要在
ios
和Android
上使用,但是如果要在Web上使用此应用程序,则可以使用React Native mostly use on
ios
andandroid
but if you want to use this application on web you can encrypt those data usingCrypto
so you encrypt your data before you store them.