You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When flushing events, a [Hub event](/[platform]/build-a-backend/auth/connect-your-frontend/listen-to-auth-events/) is sent containing the events which were successfully sent to the Pinpoint service. To receive a list of these events, subscribe to the `HubChannel.ANALYTICS` channel and handle an event of the type `AnalyticsChannelEventName.FLUSH_EVENTS`.
132
132
133
-
## Authentication events
134
-
135
-
Authentication events indicate how frequently users authenticate with your application.
136
-
137
-
On the **Analytics** page, the **Users** tab displays charts for **Sign-ins, Sign-ups, and Authentication failures**.
138
-
139
-
To learn how frequently users authenticate with your app, update your application code so that Amazon Pinpoint receives the following standard event types for authentication:
140
-
141
-
-`_userauth.sign_in`
142
-
-`_userauth.sign_up`
143
-
-`_userauth.auth_fail`
144
-
145
-
You can report authentication events by doing either of the following:
146
-
147
-
- Managing user sign-up and sign-in with Amazon Cognito user pools.
148
-
149
-
Cognito user pools are user directories that make it easier to add sign-up and sign-in to your app. As users authenticate with your app, Cognito reports authentication events to Pinpoint. For more information, see [Using Amazon Pinpoint Analytics with Amazon Cognito User Pools](https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-pools-pinpoint-integration.html) in the _Amazon Cognito Developer Guide_. Also update **amplify_outputs.json** by adding the `PinpointAppId` key under `CognitoUserPool`.
150
-
151
-
```json
152
-
"CognitoUserPool": {
153
-
"Default": {
154
-
"PoolId": "<your-user-pool-id>",
155
-
"AppClientId": "<your-app-client-id>",
156
-
"Region": "<your-app-region>",
157
-
"PinpointAppId": "<your-pinpoint-app-id>"
158
-
}
159
-
}
160
-
```
161
-
162
-
- Manually recording events using the `recordEvent()` API.
163
-
164
-
If you don't want to use Cognito user pools, you can use the Pinpoint client to record and submit authentication events, as shown in the following examples. In these examples, the event type is set to `_userauth.sign_in`, but you can substitute any authentication event type.
165
-
166
-
<BlockSwitcher>
167
-
<Blockname="Java">
168
-
169
-
```java
170
-
/**
171
-
* Call this method to log an authentication event to the analytics client.
172
-
*/
173
-
publicvoid logAuthenticationEvent() {
174
-
AnalyticsEvent event =AnalyticsEvent.builder()
175
-
.name("_userauth.sign_in")
176
-
.build();
177
-
Amplify.Analytics.recordEvent(event);
178
-
}
179
-
```
180
-
181
-
</Block>
182
-
<Blockname="Kotlin">
183
-
184
-
```kotlin
185
-
/**
186
-
* Call this method to log an authentication event to the analytics client.
187
-
*/
188
-
funlogAuthenticationEvent() {
189
-
val event =AnalyticsEvent.builder()
190
-
.name("_userauth.sign_in")
191
-
.build()
192
-
Amplify.Analytics.recordEvent(event)
193
-
}
194
-
```
195
-
</Block>
196
-
<Blockname="RxJava">
197
-
198
-
```java
199
-
200
-
/**
201
-
* Call this method to log an authentication event to the analytics client.
Copy file name to clipboardExpand all lines: src/pages/[platform]/build-a-backend/auth/concepts/passwordless/index.mdx
+13-3Lines changed: 13 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -42,7 +42,7 @@ Passwordless authentication removes the security risks and user friction associa
42
42
43
43
</Callout>
44
44
45
-
Learn how to implement passwordless sign-in flows by [overriding the Cognito UserPool to enable the sign-in methods below](/[platform]/build-a-backend/auth/modify-resources-with-cdk/#override-cognito-userpool-to-enable-passwordless-sign-in-methods).
45
+
Learn how to enable passwordless sign-in flows by [overriding the Cognito UserPool to enable the sign-in methods below](/[platform]/build-a-backend/auth/modify-resources-with-cdk/#override-cognito-userpool-to-enable-passwordless-sign-in-methods).
46
46
47
47
{/* need a section about what a "preferred" factor is */}
48
48
@@ -131,7 +131,17 @@ WebAuthn uses biometrics or security keys for authentication, leveraging device-
131
131
</InlineFilter>
132
132
<InlineFilterfilters={["android"]}>
133
133
134
-
{/**/}
134
+
You can read more about how passkeys work in the [Android developer docs](https://developer.android.com/design/ui/mobile/guides/patterns/passkeys).
135
+
136
+
<Calloutwarning>
137
+
Registering a passkey is supported on Android 9 (API level 28) and above.
138
+
</Callout>
139
+
140
+
Using passkeys with Amplify requires following these steps:
141
+
142
+
1. Deploy a Digital Asset Links file to your website granting the `get_login_creds` permission to your application. See the [Credential Manager documentation](https://developer.android.com/identity/sign-in/credential-manager#add-support-dal) for more details about this file.
143
+
1.[Configure your Amazon Cognito user pool](/[platform]/build-a-backend/auth/modify-resources-with-cdk/#override-cognito-userpool-to-enable-passwordless-sign-in-methods) with `WEB_AUTHN` as an allowed first factor, and specify your website domain as the `WebAuthnRelyingPartyID`.
144
+
1. Use the Amplify Android APIs to first [register a passkey](/[platform]/build-a-backend/auth/manage-users/manage-webauthn-credentials/#associate-webauthn-credentials) and then to [sign in with WebAuthn](/[platform]/build-a-backend/auth/connect-your-frontend/sign-in/#webauthn-passkeys).
135
145
136
146
</InlineFilter>
137
147
<InlineFilterfilters={["swift"]}>
@@ -144,6 +154,6 @@ WebAuthn uses biometrics or security keys for authentication, leveraging device-
144
154
145
155
### Managing credentials
146
156
147
-
{/* quick blurb then segue over to "manage WebAuthn credentials" page */}
157
+
Passwordless authentication with WebAuthn requires associating one or more credentials with the user's Amazon Cognito account. Amplify provides APIs that integrate with each platform's local authenticator to easily create, view, and delete these credential associations.
148
158
149
159
[Learn more about managing WebAuthn credentials](/[platform]/build-a-backend/auth/manage-users/manage-webauthn-credentials).
0 commit comments