Skip to content

Commit 5691d81

Browse files
authored
add confirm sign in snippet #7782 (#7787)
1 parent 4f081f7 commit 5691d81

File tree

1 file changed

+27
-0
lines changed
  • src/pages/[platform]/build-a-backend/auth/connect-your-frontend/sign-in

1 file changed

+27
-0
lines changed

src/pages/[platform]/build-a-backend/auth/connect-your-frontend/sign-in/index.mdx

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -281,6 +281,29 @@ For more information on handling the TOTP and MFA steps that may be returned, se
281281

282282
### Confirm sign-in
283283

284+
<InlineFilter filters={["angular", "javascript", "nextjs", "react", "react-native", "vue"]}>
285+
286+
```ts title="src/main.ts"
287+
import { confirmSignIn, signIn } from 'aws-amplify/auth'
288+
289+
const { nextStep } = await signIn({
290+
username: "[email protected]",
291+
password: "hunter2",
292+
})
293+
294+
if (nextStep === "CONFIRM_SIGN_IN_WITH_SMS_CODE") {
295+
await confirmSignIn({
296+
challengeResponse: "12345"
297+
})
298+
}
299+
```
300+
301+
</InlineFilter>
302+
<InlineFilter filters={["android"]}>
303+
304+
{/* @todo */}
305+
306+
</InlineFilter>
284307
<InlineFilter filters={["swift"]}>
285308

286309
<BlockSwitcher>
@@ -320,6 +343,10 @@ func confirmSignIn() -> AnyCancellable {
320343

321344
</Block>
322345
</BlockSwitcher>
346+
</InlineFilter>
347+
<InlineFilter filters={["flutter"]}>
348+
349+
{/* @todo */}
323350

324351
</InlineFilter>
325352

0 commit comments

Comments
 (0)