Skip to main content
Version: 3.5.2

PasswordlessRequestContainer

Handles the case where the user forgets their password, and they want to request a password reset e-mail.

Usage#

import React from "react";
import {
PasswordlessRequestContainer,
PasswordlessRequestButton,
PasswordlessRequestEmail,
Alert,
} from "@pelcro/react-pelcro-js";
import "@pelcro/react-pelcro-js/dist/pelcro.css";
export const CustomPasswordlessRequestView = () => {
return (
<PasswordlessRequestContainer
onSuccess={(userObject) => {
console.log(userObject);
}}
onFailure={(err) => {
console.error(err.message);
}}
>
<Alert />
<PasswordlessRequestEmail label="E-mail" />
<PasswordlessRequestButton />
</PasswordlessRequestContainer>
);
};

Reference#

PasswordlessRequestContainer#

Props#

onSuccess#

(userObject) โ‡’ void

Callback function called when the password reset request is sent succesfully.

onFailure#

(errorObject) โ‡’ void

Callback function called when the password reset request fails.

Children components#

Alert#

Displays the relevant errors or success messages.


PasswordlessRequestEmail Required#

Instance of Input

Input field component to receive user's e-mail


PasswordlessRequestButton Required#

Instance of Button

A button component that submits the form.

Props#

name#

string?

The title displayed inside the button