UNPKG

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 designed to be seamless, simple and effective for all applications

24 lines (21 loc) 644 B
export default async function getPin(hashedOthentSub){ const jsonData = { Info: { 'hashedOthentSub':hashedOthentSub }, request:'PIN', } return await fetch('https://api2.onairos.uk/getAccountInfoFromOthentSub', { // return await fetch('http://localhost:8080/getAccountInfoFromOthentSub', { method: 'POST', headers: { 'Content-Type': 'application/json', }, body: JSON.stringify(jsonData), }).then(response => response.json()) .then(data => { return data; }) .catch(error => console.error(error)); };