Skip to content

Commit

Permalink
[8.16](backport #4581) [Synthetics]: fix MFA totp method for browser …
Browse files Browse the repository at this point in the history
…monitors (#4597)

* [Synthetics]: fix MFA totp method for browser monitors (#4581)

(cherry picked from commit 083cf27)

# Conflicts:
#	docs/en/serverless/synthetics/synthetics-mfa.asciidoc

* Delete docs/en/serverless directory

---------

Co-authored-by: Vignesh Shanmugam <[email protected]>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
3 people authored Nov 27, 2024
1 parent 2711473 commit 042db6a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docs/en/observability/synthetics-mfa.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ import { journey, step, mfa} from '@elastic/synthetics';
journey('MFA Test', ({ page, params }) => {
step('Login using TOTP token', async () => {
// login using username and pass and go to 2FA in next page
const token = mfa.token(params.MFA_GH_SECRET);
const token = mfa.totp(params.MFA_SECRET);
await page.getByPlaceholder("token-input").fill(token)
});
});
Expand All @@ -51,12 +51,12 @@ For monitors created in the Synthetics UI using the Script editor, the `mfa` obj

```ts
step('Login using 2FA', async () => {
const token = mfa.token(params.MFA_GH_SECRET);
const token = mfa.totp(params.MFA_SECRET);
await page.getByPlaceholder("token-input").fill(token)
});
```

[NOTE]
====
`params.MFA_GH_SECRET` would be the encoded secret that was used for registering the Synthetics Authentication in your web application.
`params.MFA_SECRET` would be the encoded secret that was used for registering the Synthetics Authentication in your web application.
====

0 comments on commit 042db6a

Please sign in to comment.