Class: AuthProvider

AuthProvider()

Passes down all the data in AuthContext to its children. This Context maintains, user data like name, email, memories, profile picture, circle of user.

Constructor

new AuthProvider()

Source:

Methods

initUser(onValid, onInvalid)

Fetches current user metadata (dp, bio, memories etc)

Parameters:
Name Type Description
onValid function

Function to run for a valid user

onInvalid function

Function to run for an invalid user

Source:

loginUser(email, password) → {Promise}

Makes call to Firebase SDK with given inputs.

Parameters:
Name Type Description
email String

Email ID of user

password String

Password of the user

Source:
Returns:

Promise on signInWithEmailAndPassword() from Firebase

Type
Promise

render()

Source:
Returns:

Renders AuthContext and passing it to all its children via props.