@telegram-auth/react / CreateScriptOptions
The options to create the script.
-
↳
CreateScriptOptions
- botUsername
- authCallbackUrl
- buttonSize
- cornerRadius
- lang
- onAuthCallback
- requestAccess
- showAvatar
- widgetVersion
• botUsername: string
The username of the bot that will be used to authenticate the user.
• Optional
authCallbackUrl: string
The URL where the auth data from Telegram will be sent.
LoginButtonProps.authCallbackUrl
• Optional
buttonSize: "large"
| "medium"
| "small"
The size of the button.
Default
'large'
• Optional
cornerRadius: number
The radius of the button corners.
• Optional
lang: string
The language of the button.
Default
"en"
• Optional
onAuthCallback: (data
: TelegramAuthData
) => void
The callback function that will be called when the user is authenticated.
▸ (data
): void
Name | Type |
---|---|
data |
TelegramAuthData |
void
LoginButtonProps.onAuthCallback
• Optional
requestAccess: null
| "write"
The access level that the bot will request.
Default
"write"
LoginButtonProps.requestAccess
• Optional
showAvatar: boolean
Whether to show the user's avatar.
Default
true
• Optional
widgetVersion: string
| number
The version of the Telegram widget to deal with browser caching.