Skip to content

Commit

Permalink
more logging
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexNi245 committed Jul 29, 2024
1 parent 8ae7025 commit fbbad39
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/delivery-service/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,11 @@ const getDbWithAddressResolvedGetAccount = (
) => {
return async (ensName: string) => {
const address = await web3Provider.resolveName(ensName);
console.debug(
'getDbWithAddressResolvedGetAccount resolved address for ens name: ',
ensName,
address,
);
if (!address) {
console.info('no address found for ens name: ', ensName);
return null;
Expand Down
5 changes: 5 additions & 0 deletions packages/lib/delivery/src/Session.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,18 @@ export async function checkToken(
return false;
}

console.debug('checkToken - ensName', ensName);
console.debug('checkToken - session', session);

// check jwt for validity
try {
// will throw if signature is invalid or exp is in the past
const jwtPayload = verify(token, serverSecret, {
algorithms: ['HS256'],
});

console.debug('checkToken - jwtPayload', jwtPayload);

// check if payload is well formed
if (
typeof jwtPayload === 'string' ||
Expand Down

0 comments on commit fbbad39

Please sign in to comment.