Support for Telegram OIDC: Unsupported elliptic curve secp256k1 in JWKS
Describe the bug
When attempting to use the new Telegram OIDC / Custom OAuth provider, the authentication flow fails during the token exchange or profile retrieval phase. The error returned by Supabase Auth is: Error getting user profile from external provider.
After investigation, it appears that Telegram's OIDC implementation uses the secp256k1 elliptic curve for its signing keys (JWKS), which seems to be unsupported by the underlying Go libraries used in the Auth server (likely go-jose).
To Reproduce
- Set up a Custom OAuth provider in Supabase Dashboard using Telegram's OIDC endpoints:
- URL:
https://oauth.telegram.org/auth - Token URL:
https://oauth.telegram.org/token
- URL:
- Trigger the login flow from the client.
- Complete the Telegram authorization.
- On the redirect to
/auth/callback, the process fails with anunexpected_failureorserver_error.
Expected behavior
Supabase Auth should be able to parse and validate the ID Token signed with the secp256k1 curve provided in Telegram's JWKS (https://oauth.telegram.org/jwks).
Technical Context
Telegram's JWKS (https://oauth.telegram.org/jwks) contains keys with the following parameters:
kty:ECcrv:secp256k1
The error logs indicate that the curve is not recognized or supported, preventing the validation of the identity token.
Additional context
Telegram recently introduced this OIDC flow for bots. Many developers are moving towards this standard, but it seems that the secp256k1 curve (commonly used in blockchain but less common in standard OIDC) is creating a bottleneck for Supabase users.
I am working on this issue..
Thanks, do you have any ETA or temporary bypass ? This recent change makes the telegram OIDC unusable in my app.
I'm experiencing the same issue, breaking telegram OIDC. @mrigangha would greatly appreciate an ETA on a fix if possible, thanks!
the same issue
Has anyone found a solution to this issue?
I can take a look at this. I’ll work on a targeted ES256K/secp256k1 verification path for OIDC ID tokens, keeping the existing verifier path unchanged for other providers.
Hello, any update on this ? It's been close to 2 full month this OIDC is unavailable in my app.
Any updates?
I am really worried about the lack of support of supabase... #2542 #2548, do we have any update on this ?
It's been more than 2 month my app can't oidc login with telegram.
Faced the same issue!
Hi folks 👋 Apologies for the silence on this one! The root cause of the issue seems to be that the version of go-oidc we were using errors out when an unrecognised algorithm is advertised in the JWKS (specifically ES256K for Telegram).
We've got a PR that bumps the version for go-oidc which resolves this issue and will be out in the next release (~ in a about a few days): https://github.com/supabase/auth/pull/2696
By default, Telegram signs the ID tokens with RS256 so this fix should allow OIDC with Telegram as long as a supported algorithm is used (we do not currently support ES256K). The algorithm can be selected as shown in the Telegram docs: https://core.telegram.org/bots/telegram-login#signing-algorithm
Hi folks 👋 Apologies for the silence on this one! The root cause of the issue seems to be that the version of
go-oidcwe were using errors out when an unrecognised algorithm is advertised in the JWKS (specificallyES256Kfor Telegram).We've got a PR that bumps the version for
go-oidcwhich resolves this issue and will be out in the next release (~ in a about a few days): #2696By default, Telegram signs the ID tokens with RS256 so this fix should allow OIDC with Telegram as long as a supported algorithm is used (we do not currently support
ES256K). The algorithm can be selected as shown in the Telegram docs: https://core.telegram.org/bots/telegram-login#signing-algorithm
Thank you, can't wait!
We hit this exact issue on a hosted project (othndelarxneoxeivkdn) integrating Telegram's OIDC provider — same error, go-jose/go-jose: unsupported elliptic curve 'secp256k1', on /auth/callback.
Checked Settings → General → Service versions: our project's Auth service is on 2.195.0 (2026-08-03), one release behind 2.196.0 (2026-08-18), which is where #2696 landed. There's no self-service upgrade control for the Auth service in the dashboard (only Postgres has one under Service versions) — is Auth version rollout purely centrally scheduled, or is there a way to request/trigger an upgrade for a specific project? Reporting this in case it's useful signal that some hosted projects are still on pre-fix versions two weeks after release.