UNPKG

react-auth-verification-context

Version:

react-auth-verification-context is a library that provides a way to manage authentication state in a React application. It is implemented using the React context API, which allows you to pass data through the component tree without having to pass props do

67 lines (66 loc) 2.13 kB
"use strict"; var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } return new (P || (P = Promise))(function (resolve, reject) { function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; Object.defineProperty(exports, "__esModule", { value: true }); exports.resendVerificationCode = exports.confirmSignUp = exports.signUp = exports.checkAuth = exports.signOut = exports.signIn = void 0; const signIn = (email, password) => __awaiter(void 0, void 0, void 0, function* () { try { return true; } catch (error) { return false; } }); exports.signIn = signIn; const signUp = (username, password) => __awaiter(void 0, void 0, void 0, function* () { try { return true; } catch (error) { return false; } }); exports.signUp = signUp; const confirmSignUp = (email, code) => __awaiter(void 0, void 0, void 0, function* () { try { return true; } catch (error) { return false; } }); exports.confirmSignUp = confirmSignUp; const signOut = () => __awaiter(void 0, void 0, void 0, function* () { try { return true; } catch (error) { return false; } }); exports.signOut = signOut; const checkAuth = () => __awaiter(void 0, void 0, void 0, function* () { try { return true; } catch (error) { return false; } }); exports.checkAuth = checkAuth; const resendVerificationCode = (email) => __awaiter(void 0, void 0, void 0, function* () { try { return true; } catch (error) { return false; } }); exports.resendVerificationCode = resendVerificationCode;