Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.
====
6 changes: 3 additions & 3 deletions docs/en/serverless/synthetics/synthetics-mfa.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,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 @@ -55,12 +55,12 @@ For monitors created in the Synthetics UI using the Script editor, the `mfa` obj
[source,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.
====
Loading