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

25 lines (24 loc) 646 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = getPin; 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)); } ;