Issue with Textlocal Integration for Phone Login

Open
#1,874 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
go

Research direction

Start with internal/api/sms_provider/textlocal.go at the referenced base URL and compare it with the phone-login documentation and Textlocal OTP API documentation. Reproduce the signInWithOtp call and verify which Textlocal endpoint and API-key setup are expected. Done means the supported Textlocal regions are correctly handled and the documentation clearly explains provider and key requirements.

Written by the indexing model from the issue text.

Description

bug

According to the documentation on phone login, Textlocal is listed as a supported provider, with instructions to create API keys via Textlocal signup. However, based on the code, it appears that the implementation is using Textlocal India (api.textlocal.in) rather than the global API (api.txtlocal.com).

The base URL in the code at this line does not align with the URL documented in the Textlocal OTP API documentation (api.txtlocal.com).

Code used for testing:

const { data, error } = await supabase.auth.signInWithOtp({ phone: "****", });

Error encountered:

{ "session": null, "user": null, "error": "AuthApiError: Error sending confirmation OTP to provider: textlocal error: Invalid login details (code: 3) message" }

The actual Textlocal API seems to be misconfigured or not used correctly in the current implementation. I believe both textlocal.in (India) and textlocal.com (global) should be supported. The documentation is unclear and needs to be more explicit regarding the creation of API keys and which version of Textlocal to use.

Can someone help address this issue?

Thanks

Dominant language
Go
Stars
2.6k
Forks
764
Avg merge
5d 3h
Merged PRs (30d)
39

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from supabase/auth

All issues in supabase/auth

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.