My use case is the following - I'm allowing the use of Telegram as a login provider and don't collect any additional information, such as email. However, I still want to notify users about certain actions in their accounts. Looks like I cannot do this since the user ID is a hash. What's the proper way to support this? I don't mind creating a PR, but it needs some alignment on the design.
I was thinking about changing https://github.com/go-pkgz/auth/blob/master/v2/provider/telegram.go#L190-L194 to something like this:
const telegramUserIDAttr = "telegram_user_id"
....
user := &authtoken.User{
ID: id,
Name: update.Message.Chat.Name,
Picture: avatarURL,
}
user.SetStrAttr(telegramUserIDAttr, fmt.Sprint(update.Message.Chat.ID))
authRequest.user = user
My use case is the following - I'm allowing the use of Telegram as a login provider and don't collect any additional information, such as email. However, I still want to notify users about certain actions in their accounts. Looks like I cannot do this since the user ID is a hash. What's the proper way to support this? I don't mind creating a PR, but it needs some alignment on the design.
I was thinking about changing https://github.com/go-pkgz/auth/blob/master/v2/provider/telegram.go#L190-L194 to something like this: