Type Alias: AuthProps
AuthProps =
Pick<AuthCoreProps,"signUpTerms"|"logo"|"layout"> &object
Defined in: react-auth-cognito/src/Auth.tsx:233
Type Declaration
autoSignInAfterSignUp?
optionalautoSignInAfterSignUp?:boolean
Sign the user in right after they confirm their sign-up code, instead of
sending them back to the sign-in screen to type the password again.
Defaults to false.
initialScreen?
optionalinitialScreen?:AuthScreen
The screen shown first, e.g. { value: 'signUp' } for a sign-up link.
Read on mount only, like useState's initial value.
onAuthEvent?
optionalonAuthEvent?: (event) =>void
Called on every screen the user sees and on the outcome of every
authentication action, failures included — the user mistakes onError
skips (wrong password, wrong code) are reported here. Meant for analytics:
the event never holds what the user typed.
Parameters
| Parameter | Type |
|---|---|
event | AuthEvent |
Returns
void
onError?
optionalonError?: (error) =>void
Callback function invoked when an error occurs during authentication operations. Receives the error object that was caught.
Parameters
| Parameter | Type |
|---|---|
error | Error |
Returns
void
socialProviders?
optionalsocialProviders?:SocialProvider[]
Federated identity providers to offer alongside email/password. Each one
must also be configured on the Cognito user pool and app client, and the
app's Amplify config must declare Auth.Cognito.loginWith.oauth.