diff --git a/README.md b/README.md index 4646f8e7..6e2e2546 100644 --- a/README.md +++ b/README.md @@ -68,6 +68,8 @@ If the pods are running correctly, the services should be accessible at the foll - Nakama dashboard: - Nakama API: +> ⚠️ Currently Aleo Wallet does not work with the local kubernetes frontend deployment, so prefer running it in dev mode as illustrated in the following section. +> > ⚠️ On MacOS you may need to configure `dnsmasq` in order to access custom domain names. Consider following this [guide](https://www.stevenrombauts.be/2018/01/use-dnsmasq-instead-of-etc-hosts/#2-only-send-test-and-box-queries-to-dnsmasq) and use `.localhost` instead of `.test` and `.box`. ### Run frontend in dev mode diff --git a/backend/src/hooks/auth.ts b/backend/src/hooks/auth.ts index 5c4ac171..086d4349 100644 --- a/backend/src/hooks/auth.ts +++ b/backend/src/hooks/auth.ts @@ -61,7 +61,10 @@ export const beforeAuthenticateCustom = beforeHookHandler((ctx, logger, nk, data // log in data.create = false; const signature: string = splitId[0]; - if (!verifySignature(nk, ctx, logger, address, signature)) throw errors.invalidSignature; + + const isSignatureValid = verifySignature(nk, ctx, logger, address, signature); + + if (!isSignatureValid) throw errors.invalidSignature; data.username = storedUsername; } else if (splitId.length === 2) { // registration @@ -70,7 +73,9 @@ export const beforeAuthenticateCustom = beforeHookHandler((ctx, logger, nk, data const signature: string = splitId[0]; const username: string = splitId[1].toLowerCase(); - if (!verifySignature(nk, ctx, logger, address, signature)) throw errors.invalidSignature; + const isSignatureValid = verifySignature(nk, ctx, logger, address, signature); + + if (!isSignatureValid) throw errors.invalidSignature; if (profanityFilter.isProfane(username)) throw errors.containsProfanity; saveUsername(nk, address, username);