Repository navigation
Releases: portier/portier-node
Releases · portier/portier-node
Release list
v0.7.0
-
BREAKING: This PR reverts the API change made to the
verifymethod in v0.6.0:-async verify(token: string): Promise<{ email: string; state?: string }> { +async verify(token: string): Promise<string> {
v0.6.0 mistakenly assumed
statewas part of the token, but it is simply returned in a query parameterstateto the callback / redirect URI. As such, your application can extract it directly from the request.
v0.6.0
-
The
authenticatemethod now takes an optional second argumentstate, which is returned byverifyin your callback:-async authenticate(email: string): Promise<string> +async authenticate(email: string, state?: string): Promise<string>
-
BREAKING: The
verifymethod now returns (a promise for) an object, so that it can also return the originalstatefrom the call toauthenticate:-async verify(token: string): Promise<string> { +async verify(token: string): Promise<{ email: string; state?: string }> {
v0.5.0
- The minimum Node.js version has been bumped to v18.
- This package now uses ESM. The
PortierClientclass is the default export.-const { PortierClient } = require("portier"); +import PortierClient from "portier";
RedisStorehas been upgrade to the npmredisv4 package (ie.@redis/clientv1).- The
node-fetchdependency has been dropped and replaced by the Node.js built-infetchAPI.