-
-
Notifications
You must be signed in to change notification settings - Fork 7
Description
Problem
When using better-auth-telegram with only the OIDC provider (oauth.telegram.org) and without the Telegram Login Widget or Mini App features, the plugin still injects user schema fields telegramId, telegramUsername, and telegramPhoneNumber. This forces additional columns in the user model and migrations even though they are unused for the OIDC flow. It increases DB surface area and complicates adoption for teams that only need OIDC.
Proposed Solution
Add a configuration flag (e.g., schema: { includeUserFields: false } or oidcOnly: true) that prevents the plugin from adding user schema fields (telegramId, telegramUsername, telegramPhoneNumber) when only OIDC is used. The account fields used for OAuth linking can remain if needed, but user-level Telegram fields should be optional and disabled by default in OIDC-only mode. Include docs and an example showing OIDC-only setup without extra user columns.
Alternatives Considered
No response
Additional Context
No response