Open fbarthez opened 2 years ago
Upon further inspection of phone.go it seems like this might be more of a feature request for Supabase Studio as it seems like GoTrue doesn't make modifications to the message(other than substituting {{ .code }}
)
New lines might not be going through as they are escaped on submission by the form used to contain the SMS OTP template. In order to fix this issue, we'll have to modify the front-end form which holds the custom message so that new lines are not escaped. We'll move this issue to Supabase/Studio and continue watching the issue from there.
Let us know if you have further questions/concerns.
Thanks! Joel
I'd love to take on this issue
Hey team!
This should now be resolved with the new template editor experience. Feel free to re-open if you're still facing issues though.
cc: @MildTomato
@J0 doesn't work so far as i can tell... it looks like https://github.com/supabase/supabase/pull/7242 was never actually merged?
can i work on this issue @fbarthez ?
Hey @Bayyana-kiran, sure! I'm just the author of the issue, haven't tested the PR and did not follow the discussion in the past months.
@fbarthez @Bayyana-kiran @nathaneidelson @J0 @v1b3m Is this issue being worked upon?
@bilal-aamer yes, this is still being worked on, see the activity in the linked PR
Hey team,
As an update on this issue, there's now a text field to enter multi line messages on the dashboard courtesy of frontend. However, as our internal auth configuration on the supabase platform escapes newlines (we use a .env
file so it helps with security) it's not possible to add multiple newlines as the WebOTP spec at the moment. This is something we're still looking to but might take a while longer to fix - we don't have a fixed date at the moment but will get back when there are updates.
Appreciate your patience on this - let us know if there are any questions
Feature request
Is your feature request related to a problem? Please describe.
I'm using the SMS OTP feature for a progressive web application to be used on mobiles and would like to use the WebOTP API to automatically handle the SMS. The new templating feature gets me almost there – but only almost since it does not allow newlines (\n).
Describe the solution you'd like
To conform to the WebOTP API, the SMS needs to contain at least one newline, see e.g. here or here. The template should allow for newlines.
Describe alternatives you've considered
There currently is no alternative to WebOTP for automated SMS OTP handling.
Additional context
I've tried to sneak a newline into the template via "\n" and "\\n", but to no avail.