v0.3.0
Changes:
- The
salt
now includes custom parameters in a URL-encoded query string, allowing to pass custom data and expiration time in a standardized format. - The
createChallenge
function now acceptsexpires: Date
parameter, appending?expires=
parameter to the salt (as a Unix timestamp in seconds). - The
verifySolution
function now automatically verifies the expiration of the challenge if the salt contains?expires=
parameter. This feature can be disabled by utilizingcheckExpires: false
as the optional third argument. - Introduced the new function
extractParams
, enabling the extraction of custom parameters from the base64-encoded payload, payload object, or challenge object.