onairos
Version:
The Onairos Library is a collection of functions that enable Applications to connect and communicate data with Onairos Identities via User Authorization. Integration for developers is seamless, simple and effective for all applications. LLM SDK capabiliti
25 lines (20 loc) • 556 B
JavaScript
export default async function getPin(userSub){
try {
const response = await fetch('https://api2.onairos.uk/getAccountInfoFromUserSub', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({
'userSub': userSub
})
});
if (!response.ok) {
throw new Error(`HTTP error! status: ${response.status}`);
}
return await response.json();
} catch (error) {
console.error('Error getting PIN:', error);
throw error;
}
}