goth
goth copied to clipboard
VK provider returns error for users with empty 'email' field
Hi
I've encountered an issue where vk
provider will return "Cannot fetch user email" error for users which doesn't have this field filled in their VK profile.
I can't see why this is treated as an error and I think it should be fixed.
I can do a pull request fixing the issue but not sure what is the best way to implement it.
Fixing it directly in vk
provider will probably break compatibility for some of existing goth users. I think some method on vk
provider or separate provider should be created. Any opinions?
Steps to reproduce the issue:
- register new VK account without specifying email. (I think it became possible since around 2018, but may be earlier).
- Try to authorize him with
goth/provider/vk
Expected:
gothic.CompleteUserAuth(c.Writer, c.Request)
should return no error.
Actual:
CompleteUserAuth
returns error Cannot fetch user email