📜  添加和获取令牌到securestore expo - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:02:19.031000             🧑  作者: Mango

代码示例1
import {SecureStore} from 'expo';

async function saveToken(val){
    await SecureStore.setItemAsync('secure_token',val);
}

async function getToken(key){
    const token = await SecureStore.getItemAsync(key);
      return token
}