diff --git a/auth/README.md b/auth/README.md index e79e6b8..4a9b2f2 100644 --- a/auth/README.md +++ b/auth/README.md @@ -185,7 +185,7 @@ The `useCreateUserWithEmailAndPassword` hook takes the following parameters: Returns: -- `createUserWithEmailAndPassword(email: string, password: string)`: a function you can call to start the registration +- `createUserWithEmailAndPassword(email: string, password: string) => Promise`: A function you can call to start the registration. Returns the `auth.UserCredential` if the user was created successfully, or `undefined` if there was an error. - `user`: The `auth.UserCredential` if the user was created or `undefined` if not - `loading`: A `boolean` to indicate whether the the user creation is processing - `error`: Any `Error` returned by Firebase when trying to create the user, or `undefined` if there is no error @@ -261,8 +261,8 @@ The `useSignInWithEmailAndPassword` hook takes the following parameters: Returns: -- `signInWithEmailAndPassword(email: string, password: string)`: a function you can call to start the login -- `user`: The `auth.User` if the user was logged in or `undefined` if not +- `signInWithEmailAndPassword(email: string, password: string) => Promise`: A function you can call to start the login. Returns the `auth.UserCredential` if the user was signed in successfully, or `undefined` if there was an error. +- `user`: The `auth.UserCredential` if the user was logged in or `undefined` if not - `loading`: A `boolean` to indicate whether the the user login is processing - `error`: Any `Error` returned by Firebase when trying to login the user, or `undefined` if there is no error @@ -332,8 +332,8 @@ The `useSignInWithApple` hook takes the following parameters: Returns: -- `signInWithApple(scopes: string[], customOAuthParameters: auth.CustomParameters)`: a function you can call to start the login -- `user`: The `auth.User` if the user was logged in or `undefined` if not +- `signInWithApple(scopes: string[], customOAuthParameters: auth.CustomParameters) => Promise`: A function you can call to start the login. Returns the `auth.UserCredential` if the user was signed in successfully, or `undefined` if there was an error. +- `user`: The `auth.UserCredential` if the user was logged in or `undefined` if not - `loading`: A `boolean` to indicate whether the the user login is processing - `error`: Any `Error` returned by Firebase when trying to login the user, or `undefined` if there is no error @@ -355,8 +355,8 @@ The `useSignInWithFacebook` hook takes the following parameters: Returns: -- `signInWithFacebook(scopes: string[], customOAuthParameters: auth.CustomParameters)`: a function you can call to start the login -- `user`: The `auth.User` if the user was logged in or `undefined` if not +- `signInWithFacebook(scopes: string[], customOAuthParameters: auth.CustomParameters) => Promise`: A function you can call to start the login. Returns the `auth.UserCredential` if the user was signed in successfully, or `undefined` if there was an error. +- `user`: The `auth.UserCredential` if the user was logged in or `undefined` if not - `loading`: A `boolean` to indicate whether the the user login is processing - `error`: Any `Error` returned by Firebase when trying to login the user, or `undefined` if there is no error @@ -378,8 +378,8 @@ The `useSignInWithGithub` hook takes the following parameters: Returns: -- `signInWithGithub(scopes: string[], customOAuthParameters: auth.CustomParameters)`: a function you can call to start the login -- `user`: The `auth.User` if the user was logged in or `undefined` if not +- `signInWithGithub(scopes: string[], customOAuthParameters: auth.CustomParameters) => Promise`: A function you can call to start the login. Returns the `auth.UserCredential` if the user was signed in successfully, or `undefined` if there was an error. +- `user`: The `auth.UserCredential` if the user was logged in or `undefined` if not - `loading`: A `boolean` to indicate whether the the user login is processing - `error`: Any `Error` returned by Firebase when trying to login the user, or `undefined` if there is no error @@ -401,8 +401,8 @@ The `useSignInWithGoogle` hook takes the following parameters: Returns: -- `signInWithGoogle(scopes: string[], customOAuthParameters: auth.CustomParameters)`: a function you can call to start the login -- `user`: The `auth.User` if the user was logged in or `undefined` if not +- `signInWithGoogle(scopes: string[], customOAuthParameters: auth.CustomParameters) => Promise`: A function you can call to start the login. Returns the `auth.UserCredential` if the user was signed in successfully, or `undefined` if there was an error. +- `user`: The `auth.UserCredential` if the user was logged in or `undefined` if not - `loading`: A `boolean` to indicate whether the the user login is processing - `error`: Any `Error` returned by Firebase when trying to login the user, or `undefined` if there is no error @@ -426,8 +426,8 @@ The `useSignInWithMicrosoft` hook takes the following parameters: Returns: -- `signInWithMicrosoft(scopes: string[], customOAuthParameters: auth.CustomParameters)`: a function you can call to start the login -- `user`: The `auth.User` if the user was logged in or `undefined` if not +- `signInWithMicrosoft(scopes: string[], customOAuthParameters: auth.CustomParameters) => Promise`: A function you can call to start the login. Returns the `auth.UserCredential` if the user was signed in successfully, or `undefined` if there was an error. +- `user`: The `auth.UserCredential` if the user was logged in or `undefined` if not - `loading`: A `boolean` to indicate whether the the user login is processing - `error`: Any `Error` returned by Firebase when trying to login the user, or `undefined` if there is no error @@ -449,8 +449,8 @@ The `useSignInWithTwitter` hook takes the following parameters: Returns: -- `signInWithTwitter(scopes: string[], customOAuthParameters: auth.CustomParameters)`: a function you can call to start the login -- `user`: The `auth.User` if the user was logged in or `undefined` if not +- `signInWithTwitter(scopes: string[], customOAuthParameters: auth.CustomParameters) => Promise`: A function you can call to start the login. Returns the `auth.UserCredential` if the user was signed in successfully, or `undefined` if there was an error. +- `user`: The `auth.UserCredential` if the user was logged in or `undefined` if not - `loading`: A `boolean` to indicate whether the the user login is processing - `error`: Any `Error` returned by Firebase when trying to login the user, or `undefined` if there is no error @@ -472,8 +472,8 @@ The `useSignInWithYahoo` hook takes the following parameters: Returns: -- `signInWithYahoo(scopes: string[], customOAuthParameters: auth.CustomParameters)`: a function you can call to start the login -- `user`: The `auth.User` if the user was logged in or `undefined` if not +- `signInWithYahoo(scopes: string[], customOAuthParameters: auth.CustomParameters) => Promise`: A function you can call to start the login. Returns the `auth.UserCredential` if the user was signed in successfully, or `undefined` if there was an error. +- `user`: The `auth.UserCredential` if the user was logged in or `undefined` if not - `loading`: A `boolean` to indicate whether the the user login is processing - `error`: Any `Error` returned by Firebase when trying to login the user, or `undefined` if there is no error @@ -540,7 +540,7 @@ The `useSendSignInLinkToEmail` hook takes the following parameters: Returns: -- `sendSignInLinkToEmail(email: string, actionCodeSettings: ActionCodeSettings)`: a function you can call to send a sign-in email link to an email. Requires an [actionCodeSettings](https://firebase.google.com/docs/reference/js/auth.actioncodesettings.md#actioncodesettings_interface) object. +- `sendSignInLinkToEmail(email: string, actionCodeSettings: ActionCodeSettings) => Promise`: A function you can call to send a sign-in email link to an email. Requires an [actionCodeSettings](https://firebase.google.com/docs/reference/js/auth.actioncodesettings.md#actioncodesettings_interface) object. Returns `true` if the function was successful, or `false` if there was an error. - `sending`: A `boolean` to indicate whether the email is being sent - `error`: Any `Error` returned by Firebase when trying to send the email, or `undefined` if there is no error @@ -591,8 +591,13 @@ const SendSignInLinkToEmail = () => { /> @@ -689,7 +694,7 @@ The `useUpdateEmail` hook takes the following parameters: Returns: -- `updateEmail(email: string)`: a function you can call to update the current user's email address +- `updateEmail(email: string) => Promise`: A function you can call to update the current user's email address. Returns `true` if the function was successful, or `false` if there was an error. - `updating`: A `boolean` to indicate whether the user update is processing - `error`: Any `Error` returned by Firebase when trying to update the user, or `undefined` if there is no error @@ -721,8 +726,10 @@ const UpdateEmail = () => { />