Redux authentication actions
Methods
# static changeAuthFlow() → {module:reduxAuthActions~ChangeAuthFlowReturnObject}
Changes the auth flow
# static doNotShowWelcomePage() → {module:reduxAuthActions~DoNotShowWelcomePageReturnObject}
Does not show the welcome page
# static getUserInfo() → {function}
Gets user info, including the users full name and a profile picture
A React Redux dispatch function
function
# static handleAuthStateChanges() → {function}
Updates redux state whenever Firebase Auth state changes
A React Redux dispatch function
function
# static showWelcomePage(isAuthFlowComplete) → {module:reduxAuthActions~ShowWelcomePageReturnObject}
Shows the welcome page.
If the auth flow is complete, the welcome page will show immediately.
Otherwise, the welcome page will show once the auth flow is complete.
Parameters:
Name | Type | Description |
---|---|---|
isAuthFlowComplete |
boolean | Indicates if the auth flow is complete |
# static startAuthFlow() → {module:reduxAuthActions~StartAuthFlowReturnObject}
Starts the auth flow
# static welcomePageComplete() → {module:reduxAuthActions~WelcomePageCompleteReturnObject}
Hides (i.e. removes) the welcome page
# inner authError(error) → {module:reduxAuthActions~AuthErrorReturnObject}
Sets the auth error to the given error
Parameters:
Name | Type | Description |
---|---|---|
error |
object | The auth error |
# inner retrievedUsersName(name) → {module:reduxAuthActions~RetrievedUsersNameReturnObject}
Sets the user's name
Parameters:
Name | Type | Description |
---|---|---|
name |
string | The user's name |
# inner retrievedUsersPictureUrl(url) → {module:reduxAuthActions~RetrievedUsersPictureUrlReturnObject}
Sets the user's profile picture URL
Parameters:
Name | Type | Description |
---|---|---|
url |
string | The profile picture url |
# inner signOutSuccess() → {module:reduxAuthActions~SignOutSuccessReturnObject}
Indicates that the sign out was successful
# inner userAuthenticated() → {module:reduxAuthActions~UserAuthenticatedReturnObject}
Indicates that the user is authenticated
# inner userNotAuthenticated() → {module:reduxAuthActions~UserNotAuthenticatedReturnObject}
Indicates that the user is not authenticated
# inner usersNameRetrievalFailed() → {module:reduxAuthActions~UsersNameRetrievalFailedReturnObject}
Indicates that the retrieval of the user's name failed
# inner usersPictureUrlRetrievalFailed() → {module:reduxAuthActions~UsersPictureUrlRetrievalFailedReturnObject}
Indicates that the retrieval of the user's profile picture url failed
Type Definitions
# AuthErrorReturnObject
Return object for the authError function
Properties:
Name | Type | Description |
---|---|---|
type |
module:reduxActionTypes | An action type |
error |
object | The auth error |
# ChangeAuthFlowReturnObject
Return object for the changeAuthFlow function
Properties:
Name | Type | Description |
---|---|---|
type |
module:reduxActionTypes | An action type |
flow |
module:authFlows | The current auth flow to change to |
# DoNotShowWelcomePageReturnObject
Return object for the doNotShowWelcomePage function
Properties:
Name | Type | Description |
---|---|---|
type |
module:reduxActionTypes | An action type |
# RetrievedUsersNameReturnObject
Return object for the retrievedUsersName function
Properties:
Name | Type | Description |
---|---|---|
type |
module:reduxActionTypes | An action type |
name |
string | The user's name |
# RetrievedUsersPictureUrlReturnObject
Return object for the retrievedUsersPictureUrl function
Properties:
Name | Type | Description |
---|---|---|
type |
module:reduxActionTypes | An action type |
url |
string | The profile picture url |
# ShowWelcomePageReturnObject
Return object for the showWelcomePage function
Properties:
Name | Type | Description |
---|---|---|
type |
module:reduxActionTypes | An action type |
isAuthFlowComplete |
boolean | Indicates if the auth flow is complete |
# SignOutSuccessReturnObject
Return object for the signOutSuccess function
Properties:
Name | Type | Description |
---|---|---|
type |
module:reduxActionTypes | An action type |
# StartAuthFlowReturnObject
Return object for the startAuthFlow function
Properties:
Name | Type | Description |
---|---|---|
type |
module:reduxActionTypes | An action type |
flow |
module:authFlows | The current auth flow |
# UserAuthenticatedReturnObject
Return object for the userAuthenticated function
Properties:
Name | Type | Description |
---|---|---|
type |
module:reduxActionTypes | An action type |
# UserNotAuthenticatedReturnObject
Return object for the userNotAuthenticated function
Properties:
Name | Type | Description |
---|---|---|
type |
module:reduxActionTypes | An action type |
# UsersNameRetrievalFailedReturnObject
Return object for the usersNameRetrievalFailed function
Properties:
Name | Type | Description |
---|---|---|
type |
module:reduxActionTypes | An action type |
object
# UsersPictureUrlRetrievalFailedReturnObject
Return object for the usersPictureUrlRetrievalFailed function
Properties:
Name | Type | Description |
---|---|---|
type |
module:reduxActionTypes | An action type |
# WelcomePageCompleteReturnObject
Return object for the welcomePageComplete function
Properties:
Name | Type | Description |
---|---|---|
type |
module:reduxActionTypes | An action type |