Skip to content

Commit 749c1d3

Browse files
authored
Merge branch 'aws-amplify:main' into main
2 parents 780284f + b3919cb commit 749c1d3

File tree

10 files changed

+835
-344
lines changed

10 files changed

+835
-344
lines changed

src/directory/apiReferences/amplify-js.json

Lines changed: 153 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -866850,6 +866850,159 @@
866850866850
}
866851866851
]
866852866852
},
866853+
{
866854+
"id": 26855,
866855+
"name": "api",
866856+
"variant": "declaration",
866857+
"kind": 2,
866858+
"flags": {},
866859+
"children": [
866860+
{
866861+
"id": 30510,
866862+
"name": "del",
866863+
"variant": "declaration",
866864+
"kind": 64,
866865+
"flags": {},
866866+
"signatures": [
866867+
30511
866868+
]
866869+
},
866870+
{
866871+
"id": 30513,
866872+
"name": "generateClient",
866873+
"variant": "declaration",
866874+
"kind": 64,
866875+
"flags": {},
866876+
"signatures": [
866877+
30514
866878+
]
866879+
},
866880+
{
866881+
"id": 30518,
866882+
"name": "get",
866883+
"variant": "declaration",
866884+
"kind": 64,
866885+
"flags": {},
866886+
"signatures": [
866887+
30519
866888+
]
866889+
},
866890+
{
866891+
"id": 30521,
866892+
"name": "head",
866893+
"variant": "declaration",
866894+
"kind": 64,
866895+
"flags": {},
866896+
"signatures": [
866897+
30522
866898+
]
866899+
},
866900+
{
866901+
"id": 30524,
866902+
"name": "isCancelError",
866903+
"variant": "declaration",
866904+
"kind": 64,
866905+
"flags": {},
866906+
"signatures": [
866907+
30525
866908+
]
866909+
},
866910+
{
866911+
"id": 30527,
866912+
"name": "patch",
866913+
"variant": "declaration",
866914+
"kind": 64,
866915+
"flags": {},
866916+
"signatures": [
866917+
30528
866918+
]
866919+
},
866920+
{
866921+
"id": 30530,
866922+
"name": "post",
866923+
"variant": "declaration",
866924+
"kind": 64,
866925+
"flags": {},
866926+
"signatures": [
866927+
30531
866928+
]
866929+
},
866930+
{
866931+
"id": 30533,
866932+
"name": "put",
866933+
"variant": "declaration",
866934+
"kind": 64,
866935+
"flags": {},
866936+
"signatures": [
866937+
30534
866938+
]
866939+
}
866940+
],
866941+
"groups": [
866942+
{
866943+
"title": "Modules",
866944+
"children": [
866945+
26856
866946+
]
866947+
},
866948+
{
866949+
"title": "Namespaces",
866950+
"children": [
866951+
30424
866952+
]
866953+
},
866954+
{
866955+
"title": "Enumerations",
866956+
"children": [
866957+
30436,
866958+
30445
866959+
]
866960+
},
866961+
{
866962+
"title": "Classes",
866963+
"children": [
866964+
30451
866965+
]
866966+
},
866967+
{
866968+
"title": "Interfaces",
866969+
"children": [
866970+
30473,
866971+
30484,
866972+
30488
866973+
]
866974+
},
866975+
{
866976+
"title": "Type Aliases",
866977+
"children": [
866978+
30493,
866979+
30495,
866980+
30499,
866981+
30501,
866982+
30505
866983+
]
866984+
},
866985+
{
866986+
"title": "Variables",
866987+
"children": [
866988+
30509
866989+
]
866990+
},
866991+
{
866992+
"title": "Functions",
866993+
"children": [
866994+
30510,
866995+
30513,
866996+
30518,
866997+
30521,
866998+
30524,
866999+
30527,
867000+
30530,
867001+
30533
867002+
]
867003+
}
867004+
]
867005+
},
866853867006
{
866854867007
"id": 26729,
866855867008
"name": "analytics",

src/pages/[platform]/build-a-backend/add-aws-services/analytics/record-events/index.mdx

Lines changed: 0 additions & 79 deletions
Original file line numberDiff line numberDiff line change
@@ -130,85 +130,6 @@ RxAmplify.Analytics.flushEvents();
130130

131131
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`.
132132

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-
<Block name="Java">
168-
169-
```java
170-
/**
171-
* Call this method to log an authentication event to the analytics client.
172-
*/
173-
public void logAuthenticationEvent() {
174-
AnalyticsEvent event = AnalyticsEvent.builder()
175-
.name("_userauth.sign_in")
176-
.build();
177-
Amplify.Analytics.recordEvent(event);
178-
}
179-
```
180-
181-
</Block>
182-
<Block name="Kotlin">
183-
184-
```kotlin
185-
/**
186-
* Call this method to log an authentication event to the analytics client.
187-
*/
188-
fun logAuthenticationEvent() {
189-
val event = AnalyticsEvent.builder()
190-
.name("_userauth.sign_in")
191-
.build()
192-
Amplify.Analytics.recordEvent(event)
193-
}
194-
```
195-
</Block>
196-
<Block name="RxJava">
197-
198-
```java
199-
200-
/**
201-
* Call this method to log an authentication event to the analytics client.
202-
*/
203-
public void logAuthenticationEvent() {
204-
AnalyticsEvent event = AnalyticsEvent.builder()
205-
.name("_userauth.sign_in")
206-
.build();
207-
RxAmplify.Analytics.recordEvent(event);
208-
}
209-
```
210-
</Block>
211-
</BlockSwitcher>
212133

213134
## Global Properties
214135

src/pages/[platform]/build-a-backend/auth/concepts/external-identity-providers/index.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -587,7 +587,7 @@ import 'aws-amplify/auth/enable-oauth-listener';
587587
import { getCurrentUser, fetchUserAttributes } from 'aws-amplify/auth';
588588
import { Hub } from 'aws-amplify/utils';
589589

590-
Hub.listen("auth", ({ payload }) => {
590+
Hub.listen("auth", async ({ payload }) => {
591591
switch (payload.event) {
592592
case "signInWithRedirect":
593593
const user = await getCurrentUser();

src/pages/[platform]/build-a-backend/auth/concepts/passwordless/index.mdx

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ Passwordless authentication removes the security risks and user friction associa
4242

4343
</Callout>
4444

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).
4646

4747
{/* need a section about what a "preferred" factor is */}
4848

@@ -131,7 +131,17 @@ WebAuthn uses biometrics or security keys for authentication, leveraging device-
131131
</InlineFilter>
132132
<InlineFilter filters={["android"]}>
133133

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+
<Callout warning>
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).
135145

136146
</InlineFilter>
137147
<InlineFilter filters={["swift"]}>
@@ -144,6 +154,6 @@ WebAuthn uses biometrics or security keys for authentication, leveraging device-
144154

145155
### Managing credentials
146156

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.
148158

149159
[Learn more about managing WebAuthn credentials](/[platform]/build-a-backend/auth/manage-users/manage-webauthn-credentials).

0 commit comments

Comments
 (0)