Logging in
import {Api } from '@icure/api'
import { crypto } from '@icure/api/node-compat.js' //Only needed on node
const host = 'https://kraken.svc.icure.cloud/rest/v1';
const {
userApi,
healthcarePartyApi,
cryptoApi
} = Api(host, 'user', 'password', crypto)
const loggedUser = await userApi.getCurrentUser()import { hex2ua } from "@icure/api";
const loggedUser = await userApi.getCurrentUser()
await cryptoApi.loadKeyPairsAsTextInBrowserLocalStorage(
loggedUser.healthcarePartyId,
hex2ua('308204bd02...0f3ca0975e78')
)Last updated
Was this helpful?