react-amplify-auth-context v2.0.1
react-amplify-auth-context
Easy-to-use context provider for AWS Amplify authentication wrapper
Usage
npx react-amplify-auth-context [options]
react-amplify-auth-context - v2.0.1
Index
Variables
Functions
Variables
Provider
• Provider: Provider‹undefined | object›
Defined in index.tsx:24
Const
context
• context: Context‹undefined | object› = createContext< | { Auth: typeof Auth; authState: string; authData: any; updateState: typeof updateState; checkAuthStatus: () => Promise; } | undefined
(undefined)
Defined in index.tsx:13
Functions
Const
AuthProvider
▸ AuthProvider(__namedParameters
: object): Element‹›
Defined in index.tsx:28
Parameters:
▪ __namedParameters: object
Name | Type | Default |
---|---|---|
children | ReactNode | - |
debug | boolean | false |
Returns: Element‹›
updateState
▸ updateState(event
: string, data?
: any): void
Defined in index.tsx:25
Parameters:
Name | Type |
---|---|
event | string |
data? | any |
Returns: void
Const
useAuth
▸ useAuth(): object
Defined in index.tsx:96
Returns: object
Auth: typeof Auth
authData: any
authState: string
checkAuthStatus(): function
- (): Promise‹void›
updateState: typeof updateState
withAuthProvider
▸ withAuthProvider(C
: FC): FC
Defined in index.tsx:101
Parameters:
Name | Type |
---|---|
C | FC |
Returns: FC