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: add support for Twilio Verify #1124

Merged
merged 40 commits into from
Jun 23, 2023
Merged

feat: add support for Twilio Verify #1124

merged 40 commits into from
Jun 23, 2023

Conversation

J0
Copy link
Contributor

@J0 J0 commented Jun 2, 2023

What kind of change does this PR introduce?

Aims to add Twilio Verify Support. Twilio Verify is implemented as a separate provider. Only one of Twilio Verify or Twilio Programmable messaging an be selected. At this time, we only support the use of the whatsapp and sms channels with Twilio Verify.

This will affect the:

  1. Signup flow
  2. Verification flow (sms and phone_change)
  3. Resend

The token is still generated, but not used in the Twilio Verify flow. It is used as a placeholder so as to try to ensure that to the OTP returned by the Verify service can only be used with the corresponding flow it was generated for.

What is the current behaviour?

We support programmable messaging.

What is the new behaviour?

Developer can toggle between using Twilio Programmable Messaging on all flows or Twilio Verify on all flows.

Additional context

Manual tests:

Probably need to be conducted on both Phone Change and SMS OTP Verification:

  • Existing Programmable Messaging (SMS/WhatsApp) (Signup/Verify/PhoneChange)
  • Twilio Verify(SMS/WhatsApp)
  • Update Frontend to include Twilio Verify

Admin methods shouldn't need to be updated to send to Twilio Verify since admin methods don't require confirmation

internal/api/sms_provider/twilio.go Outdated Show resolved Hide resolved
internal/api/sms_provider/twilio.go Outdated Show resolved Hide resolved
internal/api/sms_provider/twilio.go Outdated Show resolved Hide resolved
internal/api/verify.go Outdated Show resolved Hide resolved
internal/conf/configuration.go Outdated Show resolved Hide resolved
@J0 J0 marked this pull request as ready for review June 19, 2023 09:15
@J0 J0 requested a review from a team as a code owner June 19, 2023 09:15
internal/api/reauthenticate.go Outdated Show resolved Hide resolved
internal/api/sms_provider/twilio_verify.go Outdated Show resolved Hide resolved
Copy link
Member

@kangmingtay kangmingtay left a comment

Choose a reason for hiding this comment

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

nice work, this looks great! should be fine to merge if you've tested it with twilio verify end to end too

@J0 J0 merged commit 7e240f8 into master Jun 23, 2023
@J0 J0 deleted the j0/add_twilio_verify branch June 23, 2023 07:12
@github-actions
Copy link
Contributor

🎉 This PR is included in version 2.76.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

uxodb pushed a commit to uxodb/auth that referenced this pull request Nov 13, 2024
## What kind of change does this PR introduce?

Aims to add Twilio Verify Support. Twilio Verify is implemented as a
separate provider. Only one of Twilio Verify or Twilio Programmable
messaging an be selected. At this time, we only support the use of the
`whatsapp` and `sms` channels with Twilio Verify.

This will affect the:
1. Signup flow
2. Verification flow (sms and phone_change)
3. Resend

The token is still generated, but not used in the Twilio Verify flow. It
is used as a placeholder so as to try to ensure that to the OTP returned
by the Verify service can only be used with the corresponding flow it
was generated for.

## What is the current behaviour?

We support programmable messaging.

## What is the new behaviour?

Developer can toggle between using Twilio Programmable Messaging on all
flows or Twilio Verify on all flows.

## Additional context

Manual tests:

Probably need to be conducted on both Phone Change and SMS OTP
Verification:

- [x] Existing Programmable Messaging (SMS/WhatsApp)
(Signup/Verify/PhoneChange)
- [x] Twilio Verify(SMS/WhatsApp) 
- [ ] Update Frontend to include Twilio Verify

Admin methods shouldn't need to be updated to send to Twilio Verify
since admin methods don't require confirmation

---------

Co-authored-by: joel@joellee.org <joel@joellee.org>
Co-authored-by: Stojan Dimitrovski <sdimitrovski@gmail.com>
LashaJini pushed a commit to LashaJini/auth that referenced this pull request Nov 13, 2024
## What kind of change does this PR introduce?

Aims to add Twilio Verify Support. Twilio Verify is implemented as a
separate provider. Only one of Twilio Verify or Twilio Programmable
messaging an be selected. At this time, we only support the use of the
`whatsapp` and `sms` channels with Twilio Verify.

This will affect the:
1. Signup flow
2. Verification flow (sms and phone_change)
3. Resend

The token is still generated, but not used in the Twilio Verify flow. It
is used as a placeholder so as to try to ensure that to the OTP returned
by the Verify service can only be used with the corresponding flow it
was generated for.

## What is the current behaviour?

We support programmable messaging.

## What is the new behaviour?

Developer can toggle between using Twilio Programmable Messaging on all
flows or Twilio Verify on all flows.

## Additional context

Manual tests:

Probably need to be conducted on both Phone Change and SMS OTP
Verification:

- [x] Existing Programmable Messaging (SMS/WhatsApp)
(Signup/Verify/PhoneChange)
- [x] Twilio Verify(SMS/WhatsApp) 
- [ ] Update Frontend to include Twilio Verify

Admin methods shouldn't need to be updated to send to Twilio Verify
since admin methods don't require confirmation

---------

Co-authored-by: joel@joellee.org <joel@joellee.org>
Co-authored-by: Stojan Dimitrovski <sdimitrovski@gmail.com>
LashaJini pushed a commit to LashaJini/auth that referenced this pull request Nov 15, 2024
## What kind of change does this PR introduce?

Aims to add Twilio Verify Support. Twilio Verify is implemented as a
separate provider. Only one of Twilio Verify or Twilio Programmable
messaging an be selected. At this time, we only support the use of the
`whatsapp` and `sms` channels with Twilio Verify.

This will affect the:
1. Signup flow
2. Verification flow (sms and phone_change)
3. Resend

The token is still generated, but not used in the Twilio Verify flow. It
is used as a placeholder so as to try to ensure that to the OTP returned
by the Verify service can only be used with the corresponding flow it
was generated for.

## What is the current behaviour?

We support programmable messaging.

## What is the new behaviour?

Developer can toggle between using Twilio Programmable Messaging on all
flows or Twilio Verify on all flows.

## Additional context

Manual tests:

Probably need to be conducted on both Phone Change and SMS OTP
Verification:

- [x] Existing Programmable Messaging (SMS/WhatsApp)
(Signup/Verify/PhoneChange)
- [x] Twilio Verify(SMS/WhatsApp) 
- [ ] Update Frontend to include Twilio Verify

Admin methods shouldn't need to be updated to send to Twilio Verify
since admin methods don't require confirmation

---------

Co-authored-by: joel@joellee.org <joel@joellee.org>
Co-authored-by: Stojan Dimitrovski <sdimitrovski@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants