telegramProvider function
Creates a Telegram Login Widget provider.
Resources
Implementation
TelegramProvider telegramProvider(TelegramProviderOptions options) {
return TelegramProvider(
botToken: options.botToken,
botUsername: options.botUsername,
redirectUri: options.redirectUri,
authDateMaxAge: options.authDateMaxAge,
successRedirect: options.successRedirect,
profile: (profile) {
return AuthUser(
id: profile.id.toString(),
name: profile.fullName,
image: profile.photoUrl,
attributes: profile.toJson(),
);
},
);
}