2.0.1 • Published 3 years ago

react-amplify-auth-context v2.0.1

Weekly downloads
1
License
MIT
Repository
github
Last release
3 years ago

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

NameTypeDefault
childrenReactNode-
debugbooleanfalse

Returns: Element‹›


updateState

updateState(event: string, data?: any): void

Defined in index.tsx:25

Parameters:

NameType
eventstring
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:

NameType
CFC

Returns: FC