gladly-team / next-firebase-auth

Simple Firebase authentication for all Next.js rendering strategies

Home Page:https://nfa-example-git-v1x-gladly-team.vercel.app/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Improve setAuthCookies types to no be necessary passing an empty object when not setting the token

luiz504 opened this issue · comments

Following the get started documentation, the setAuthCookies function requires the req and res only, when playing this code using typescript it expects a third argument, that is a object that can receive a token property.
image

I suggest to make the whole options object as optional to not be required passing a empty object when using the function without passing any options.
reviewing the source code, I guest that just add a "?" to the user property on the line 16 will solve it
image

Thanks for the issue! A fix will be out shortly.