Skip to content

Instantly share code, notes, and snippets.

View richardruiter's full-sized avatar
🥒
Focus on test automation

Richard Ruiter richardruiter

🥒
Focus on test automation
View GitHub Profile
@bodokaiser
bodokaiser / context.ts
Last active August 10, 2023 01:00
React Hook integration for AWS Amplify Auth
import React from "react"
import { CognitoUser } from "@aws-amplify/auth"
import { useAuth } from "./hooks"
import { SignInInput } from "./types"
interface AuthState {
user: CognitoUser | null
signIn(input : SignInInput): Promise<void>
signOut(): Promise<void>