From 8d0fe7eaf755c5465d6adb90f2fa3f89ebb0d97f Mon Sep 17 00:00:00 2001 From: MTG2000 Date: Mon, 8 Aug 2022 21:10:17 +0300 Subject: [PATCH] add logs --- api/functions/is-logged-in/is-logged-in.js | 1 + .../AccountCard/LinkingAccountModal/LinkingAccountModal.tsx | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/api/functions/is-logged-in/is-logged-in.js b/api/functions/is-logged-in/is-logged-in.js index 3eeb574..6a71d49 100644 --- a/api/functions/is-logged-in/is-logged-in.js +++ b/api/functions/is-logged-in/is-logged-in.js @@ -15,6 +15,7 @@ const isLoggedInHandler = async (req, res) => { algorithms: ['HS256'], }); const hash = payload.hash; + console.log(hash); const authToken = await lnurlAuthService.getAuthTokenByHash(hash); if (!authToken) throw new Error("Not logged in yet") diff --git a/src/features/Profiles/pages/EditProfilePage/AccountCard/LinkingAccountModal/LinkingAccountModal.tsx b/src/features/Profiles/pages/EditProfilePage/AccountCard/LinkingAccountModal/LinkingAccountModal.tsx index 4449e12..038040d 100644 --- a/src/features/Profiles/pages/EditProfilePage/AccountCard/LinkingAccountModal/LinkingAccountModal.tsx +++ b/src/features/Profiles/pages/EditProfilePage/AccountCard/LinkingAccountModal/LinkingAccountModal.tsx @@ -11,7 +11,7 @@ import useCopyToClipboard from "src/utils/hooks/useCopyToClipboard"; const fetchLnurlAuth = async () => { - const res = await fetch(CONSTS.apiEndpoint + '/get-login-url', { + const res = await fetch(CONSTS.apiEndpoint + '/get-login-url?action=link', { credentials: 'include' }) const data = await res.json()