knadh / otpgateway

Standalone server for user address and OTP verification flows with pluggable providers (e-mail, SMS, bank penny drops etc.)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

+ in To number is getting removed

rrjanbiah opened this issue · comments

I think, it is due to the encoding. When + is optional for a provider, this issue may not be noticed.

Can you provide more details? Are you using the HTTP API or the built in HTML/JS plugin view?

@knadh Using HTTP API. More specifically, if we print otp.To it is without the + at https://github.com/knadh/otpgateway/blob/master/providers/pinpoint/pinpoint.go#L124 Hope I'm not the only one.

Using HTTP API

You've to encode the POST body properly before sending it to the API. HTTP client libs usually do this automatically, unless the request is being prepared manually with string concatenation. OTPGateway will automatically decode the values properly (Go net/http).

Yes, but couldn't figure it out why otp.To is missing + at https://github.com/knadh/otpgateway/blob/master/providers/pinpoint/pinpoint.go#L124 and so had to append manually there. If anyone else is not facing the issue, please feel free to close this issue.