gladly-team / next-firebase-auth

Simple Firebase authentication for all Next.js rendering strategies
https://nfa-example-git-v1x-gladly-team.vercel.app/
MIT License
1.34k stars 290 forks source link

Convert to TypeScript #655

Closed kmjennison closed 1 year ago

kmjennison commented 1 year ago

Still to do: autogenerate index.d.ts.

vercel[bot] commented 1 year ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
nfa-example ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 2, 2023 9:23pm
codecov[bot] commented 1 year ago

Codecov Report

Patch coverage: 95.23% and project coverage change: -0.87 :warning:

Comparison is base (522185a) 99.25% compared to head (81dc613) 98.39%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## v1.x #655 +/- ## ========================================== - Coverage 99.25% 98.39% -0.87% ========================================== Files 30 31 +1 Lines 675 870 +195 Branches 223 257 +34 ========================================== + Hits 670 856 +186 - Misses 5 14 +9 ``` | [Impacted Files](https://app.codecov.io/gh/gladly-team/next-firebase-auth/pull/655?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=gladly-team) | Coverage Δ | | |---|---|---| | [src/authCookies.ts](https://app.codecov.io/gh/gladly-team/next-firebase-auth/pull/655?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=gladly-team#diff-c3JjL2F1dGhDb29raWVzLnRz) | `100.00% <ø> (ø)` | | | [src/constants.ts](https://app.codecov.io/gh/gladly-team/next-firebase-auth/pull/655?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=gladly-team#diff-c3JjL2NvbnN0YW50cy50cw==) | `100.00% <ø> (ø)` | | | [src/initFirebaseClientSDK.ts](https://app.codecov.io/gh/gladly-team/next-firebase-auth/pull/655?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=gladly-team#diff-c3JjL2luaXRGaXJlYmFzZUNsaWVudFNESy50cw==) | `100.00% <ø> (ø)` | | | [src/testHelpers/createMockAuthUser.ts](https://app.codecov.io/gh/gladly-team/next-firebase-auth/pull/655?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=gladly-team#diff-c3JjL3Rlc3RIZWxwZXJzL2NyZWF0ZU1vY2tBdXRoVXNlci50cw==) | `100.00% <ø> (ø)` | | | [src/testHelpers/createMockNextContext.ts](https://app.codecov.io/gh/gladly-team/next-firebase-auth/pull/655?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=gladly-team#diff-c3JjL3Rlc3RIZWxwZXJzL2NyZWF0ZU1vY2tOZXh0Q29udGV4dC50cw==) | `100.00% <ø> (ø)` | | | [src/configTypes.ts](https://app.codecov.io/gh/gladly-team/next-firebase-auth/pull/655?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=gladly-team#diff-c3JjL2NvbmZpZ1R5cGVzLnRz) | `50.00% <50.00%> (ø)` | | | [src/getUserFromCookies.ts](https://app.codecov.io/gh/gladly-team/next-firebase-auth/pull/655?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=gladly-team#diff-c3JjL2dldFVzZXJGcm9tQ29va2llcy50cw==) | `98.21% <75.00%> (ø)` | | | [src/testHelpers/createMockFetchResponse.ts](https://app.codecov.io/gh/gladly-team/next-firebase-auth/pull/655?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=gladly-team#diff-c3JjL3Rlc3RIZWxwZXJzL2NyZWF0ZU1vY2tGZXRjaFJlc3BvbnNlLnRz) | `80.00% <80.00%> (ø)` | | | [src/useFirebaseUser.ts](https://app.codecov.io/gh/gladly-team/next-firebase-auth/pull/655?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=gladly-team#diff-c3JjL3VzZUZpcmViYXNlVXNlci50cw==) | `97.05% <86.66%> (ø)` | | | [src/firebaseAdmin.ts](https://app.codecov.io/gh/gladly-team/next-firebase-auth/pull/655?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=gladly-team#diff-c3JjL2ZpcmViYXNlQWRtaW4udHM=) | `94.05% <89.79%> (ø)` | | | ... and [20 more](https://app.codecov.io/gh/gladly-team/next-firebase-auth/pull/655?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=gladly-team) | |

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

YahiaBakour commented 1 year ago

FYI this PR broke type-ing in our project

Now need to do this

 withAuthUserTokenSSR({})(async ({ AuthUser, res }: any) => {
kmjennison commented 1 year ago

@YahiaBakour This should be fixed in 1.0.0-canary.24. Could you give that a try and see if you have any issues?