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