import { ... } from 'react-firehooks/auth';Returns and updates the JWT of the currently authenticated user
const [idToken, loading, error] = useAuthIdToken(auth);Params:
auth: Firebase Auth instance
Returns:
value: JWT;undefinedif the JWT is currently being fetched, or an error occurredloading:truewhile fetching the JWT;falseif the JWT was fetched successfully or an error occurrederror:undefinedif no error occurred
Returns and updates the deserialized JWT of the currently authenticated user
const [idToken, loading, error] = useAuthIdTokenResult(auth);Params:
auth: Firebase Auth instance
Returns:
value: Deserialized JWT;undefinedif the JWT is currently being fetched, or an error occurredloading:truewhile fetching the JWT;falseif the JWT was fetched successfully or an error occurrederror:undefinedif no error occurred
Returns and updates the currently authenticated user
const [user, loading, error] = useAuthState(auth);Params:
auth: Firebase Auth instance
Returns:
value: User;undefinedif the user is currently being fetched, or an error occurredloading:truewhile fetching the user;falseif the user was fetched successfully or an error occurrederror:undefinedif no error occurred