Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add method to verify OTP received via email #620

Merged
merged 2 commits into from
May 17, 2021
Merged

Add method to verify OTP received via email #620

merged 2 commits into from
May 17, 2021

Conversation

alexesprit
Copy link
Contributor

@alexesprit alexesprit commented May 14, 2021

Changes

This PR adds a new method to verify OTP received via email.

References

Should resolve #148.

Testing

const client = new AuthenticationClient({
  domain: "your_domain",
  clientId: "your_client_id",
})

await client.requestEmailCode({
  email: "mail@example.com",
})

// Wait for OTP

await client.verifyEmailCode({
  email: "mail@example.com",
  otp: "123456"
})

I added tests for this method as well.

  • This change adds unit test coverage
  • This change adds integration test coverage

Checklist

@alexesprit alexesprit requested a review from a team as a code owner May 14, 2021 17:03
Copy link
Contributor

@davidpatrick davidpatrick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good thanks for the PR, just some small requested changes.

src/auth/index.js Outdated Show resolved Hide resolved
src/auth/index.js Outdated Show resolved Hide resolved
@alexesprit
Copy link
Contributor Author

alexesprit commented May 17, 2021

Thank you for the review!

I've pushed changes you requested; also I removed one of test cases, as it became invalid.

Copy link
Contributor

@davidpatrick davidpatrick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks 🙇

@davidpatrick davidpatrick merged commit 71f4dd0 into auth0:master May 17, 2021
@davidpatrick davidpatrick added this to the vNext milestone May 17, 2021
@davidpatrick davidpatrick mentioned this pull request May 17, 2021
@alexesprit alexesprit deleted the verify-email-code branch May 18, 2021 05:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

no verifyEmailCode method (am I missing something obvious?)
2 participants