Components

Auth

<Auth />

Renders the Auth component. This component handles both the sign up and sign in auth flows.

Constructor

Extends

  • Component

Members

# _isMounted

Indicates if the component is mounted. Used for asynchronous tasks.
See:

View Source pages/Auth/Auth.js, line 50

# state

Auth component state
Properties:
Name Type Description
authStage module:authStages The current auth stage (see authStages enum)
windowInnerHeight number The inner height of the window (used to resize the component)
isLoading boolean Indicates whether the component is in a loading state
alertData object Data used to display an alert
type module:alertBarTypes The type of alert bar to show
heading string The alert heading
message string The alert message

View Source pages/Auth/Auth.js, line 38

Methods

# alertIsDoneHandler()

Sets alertData in state to null in state when the alert disappears

View Source pages/Auth/Auth.js, line 104

# authFlowStageDoneHandler()

Moves to the next auth stage when the current stage is complete. If the flow is done, signals to Redux that the flow is done (sign in or sign up).
Parameters:
Type Description
module:authStages The auth stage that is complete

View Source pages/Auth/Auth.js, line 114

# componentDidMount()

Starts the auth flow. Starts a window resize listener.

View Source pages/Auth/Auth.js, line 56

# componentWillUnmount()

Removes the window resize listener

View Source pages/Auth/Auth.js, line 64

# getAuthCard() → {object}

Gets the correct auth card based on the current auth stage

View Source pages/Auth/Auth.js, line 140

An auth card (JSX)
object

# render() → {object}

Renders the Auth component

View Source pages/Auth/Auth.js, line 172

The JSX to render
object

# resizeWindow()

Updates state when the inner height of the window changes

View Source pages/Auth/Auth.js, line 73

# setLoadingHandler()

Updates loading state

View Source pages/Auth/Auth.js, line 82

# showAlertHandler()

Sets alertData in state when a new alert is triggered
Parameters:
Type Description
alertBarTypes The type of alert bar to show
string The alert heading
string The alert message

View Source pages/Auth/Auth.js, line 93

# switchAuthFlowHandler()

Switches to the opposite auth flow. If the current auth flow is sign in, switch to sign up, and vice versa.

View Source pages/Auth/Auth.js, line 125