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 291 forks source link

Make the difference between withAuthUserTokenSSR and withAuthUser clearer #616

Closed wongww closed 1 year ago

wongww commented 1 year ago

Did you have difficulty using or understanding an aspect of next-firebase-auth? It was confusing to understand the difference between those two functions. Only after I looked at the source code was it clear how simple of a difference the two were!

E.g.

Behaves nearly identically to withAuthUserTokenSSR, with one key difference: it does not validate an ID token. This sentence naturally makes me ask, "Why does it not validate an ID token?"

What documentation would you like to add or change?

I wish it would have explicitly said something along the lines of:

Behaves nearly identically to withAuthUserTokenSSR, with one key difference: The AuthUser provided via context does not include an ID token.

Version What version of next-firebase-auth are you using?

0.15.0

kmjennison commented 1 year ago

Thanks for the issue!

wongww commented 1 year ago

Thanks for responding! This is my first time opening an issue on GitHub where it received attention! You've inspired me to engage more in the future!