next-auth icon indicating copy to clipboard operation
next-auth copied to clipboard

fix(ts): update `GetTokenParams` type definition to make `salt` optional

Open simonecervini opened this issue 6 months ago • 3 comments

☕️ Reasoning

This PR updates the GetTokenParams type definition to make the salt property optional. The default value for salt was already in place, but the type definition needed adjustment to reflect this.

Now, external calls to getToken({ req, secret: process.env.AUTH_SECRET }) no longer require hardcoding "__Secure-authjs.session-token" or "authjs.session-token" for the salt value.

🧢 Checklist

  • [ ] Documentation
  • [ ] Tests
  • [ ] Ready to be merged

🎫 Affected issues

📌 Resources

simonecervini avatar Aug 10 '24 21:08 simonecervini