Redux auth reducer
Members
# inner constant initialState
Initial auth state
Properties:
Name | Type | Description |
---|---|---|
isAuthenticated |
boolean | Indicates if the user is authenticated. Null value means that auth handler has not yet run. |
authFlow |
module:authFlows | The current auth flow. Null value means that there is no auth flow currently happening. |
isAuthFlowComplete |
boolean | Indicates if the current auth flow is complete. Null value means that there is no auth flow currently happening. |
error |
object | Authentication error (if one exists) |
shouldShowWelcomePage |
boolean | Indicates if the welcome page should be displayed |
usersName |
string | The user's full name |
usersPictureUrl |
string | The user's profile picture URL |
Methods
# inner authReducer(state, action) → {object}
Updates Redux auth state based on an action type and a payload
Parameters:
Name | Type | Description |
---|---|---|
state |
object | The current state |
action |
object | Any needed data (including the action type) |
The new state
object