oddsdk / ts-odd

An SDK for building apps with decentralized identity and storage.
https://odd.dev/
Apache License 2.0
179 stars 24 forks source link

wnfs session is using milliseconds to check ucans #516

Closed hugomrdias closed 1 year ago

hugomrdias commented 1 year ago

https://github.com/oddsdk/ts-odd/blob/66b8fd2efd47ca02f061d9c555b141204dcce2d0/src/components/auth/implementation/wnfs.ts#L99

needs

const currentTimeInSeconds = Math.floor(Date.now() / 1000);
if (ucan.payload.exp < (currentTimeInSeconds + 60 * 60 * 24 * 7)) return false
icidasset commented 1 year ago

Fixed on next branch.