diff options
Diffstat (limited to 'packages/merchant-backoffice-ui/src')
3 files changed, 8 insertions, 8 deletions
diff --git a/packages/merchant-backoffice-ui/src/paths/admin/create/index.tsx b/packages/merchant-backoffice-ui/src/paths/admin/create/index.tsx index 3db38acc3..0e8ea1f5b 100644 --- a/packages/merchant-backoffice-ui/src/paths/admin/create/index.tsx +++ b/packages/merchant-backoffice-ui/src/paths/admin/create/index.tsx @@ -57,7 +57,7 @@ export default function Create({ onBack, onConfirm, forceId }: Props): VNode { try { await createInstance(d); if (d.auth.token) { - const result = await lib.authenticate.createAccessToken( + const result = await lib.authenticate.createAccessTokenBearer( d.auth.token, { scope: "write", @@ -68,8 +68,8 @@ export default function Create({ onBack, onConfirm, forceId }: Props): VNode { }, ); if (result.type === "ok") { - const { access_token } = result.body; - logIn({ token: access_token }); + const { token } = result.body; + logIn({ token }); } } onConfirm(); diff --git a/packages/merchant-backoffice-ui/src/paths/instance/token/index.tsx b/packages/merchant-backoffice-ui/src/paths/instance/token/index.tsx index 889ef6f5d..13b5c45f1 100644 --- a/packages/merchant-backoffice-ui/src/paths/instance/token/index.tsx +++ b/packages/merchant-backoffice-ui/src/paths/instance/token/index.tsx @@ -85,11 +85,11 @@ export default function Token({ }} onNewToken={async (currentToken, newToken): Promise<void> => { try { - await lib.management.updateInstanceAuthentication(currentToken, { + await lib.management.updateCurrentInstanceAuthentication(currentToken, { token: newToken, method: "token" }) - const resp = await lib.authenticate.createAccessTokenMerchant(newToken, { + const resp = await lib.authenticate.createAccessTokenBearer(newToken, { scope: "write", duration: { d_us: "forever" diff --git a/packages/merchant-backoffice-ui/src/paths/login/index.tsx b/packages/merchant-backoffice-ui/src/paths/login/index.tsx index 14322f079..6a698186a 100644 --- a/packages/merchant-backoffice-ui/src/paths/login/index.tsx +++ b/packages/merchant-backoffice-ui/src/paths/login/index.tsx @@ -34,7 +34,7 @@ import { } from "../../context/session.js"; import { Notification } from "../../utils/types.js"; -interface Props {} +interface Props { } const tokenRequest = { scope: "write", @@ -55,7 +55,7 @@ export function LoginPage(_p: Props): VNode { async function doImpersonateImpl(instanceId: string) { const result = await lib .impersonate(instanceId) - .createAccessTokenMerchant(token, tokenRequest); + .createAccessTokenBearer(token, tokenRequest); if (result.type === "ok") { const { token } = result.body; logIn({ token }); @@ -80,7 +80,7 @@ export function LoginPage(_p: Props): VNode { } } async function doLoginImpl() { - const result = await lib.authenticate.createAccessTokenMerchant( + const result = await lib.authenticate.createAccessTokenBearer( token, tokenRequest, ); |