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

feat(console): Send preview OTP #2386

Merged
merged 9 commits into from
Jun 12, 2023
Merged

Conversation

Cosmin-Parvulescu
Copy link
Contributor

@Cosmin-Parvulescu Cosmin-Parvulescu commented Jun 9, 2023

Description

  • Added an app contact email that gets set on the outlet context alongside the app contact address URN, this is used to display the e-mail as part of the Email OTP Designer;
  • Added an OTP Preview endpoint holding an action, this is used from a fetcher query in order to send preview e-mails without navigating away. Exceptions get swallowed and repackaged for client processing;
  • Added Address fetcher to the console app, this is needed to access the generateEmailOTP method;
  • Added preview flag to the generateEmailOTP method. This effectively sets the delay expected between e-mails to be 15 seconds;
  • Added parameter for delayMiliseconds to generateVerificationCode. This overrides the environment variable delayMiliseconds and can be used for different expectations for different e-mails.

Related Issues

Testing

  • Deployment to dev and sending preview e-mail;
  • Refreshing page after preview and sending again, noticing error appear.

Checklist

  • I have read the CONTRIBUTING guidelines
  • I have tested my code (manually and/or automated if applicable)
  • I have updated the documentation (if necessary)

@Cosmin-Parvulescu Cosmin-Parvulescu self-assigned this Jun 9, 2023
@Cosmin-Parvulescu Cosmin-Parvulescu added the enhancement Indicates new feature requests label Jun 9, 2023
@Cosmin-Parvulescu Cosmin-Parvulescu marked this pull request as ready for review June 9, 2023 09:45
@Cosmin-Parvulescu Cosmin-Parvulescu marked this pull request as draft June 9, 2023 12:02
},
preview: true,
})
} catch (e) {
Copy link
Contributor

Choose a reason for hiding this comment

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

If you're not doing anything specific in the error handler, this is no longer needed as getRollupReqFunctionErrorWrapper() takes care of it.

@Cosmin-Parvulescu Cosmin-Parvulescu marked this pull request as ready for review June 12, 2023 10:02
@maurerbot maurerbot merged commit 270fffd into main Jun 12, 2023
@maurerbot maurerbot deleted the feat/console/send-preview-OTP branch June 12, 2023 13:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Indicates new feature requests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

feat(console): Send preview OTP
3 participants