in maplibre-js-react-iot-asset-tracking/src/LocationMap.js [33:44]
async function getUserCredentials() {
let currCredentials;
try {
currCredentials = await Auth.currentCredentials();
if ("sessionToken" in currCredentials) {
return setCredentials(currCredentials);
} else throw new Error("Not Authenticated");
} catch (err) {
alert(err);
return null;
}
}