goth icon indicating copy to clipboard operation
goth copied to clipboard

VK provider returns error for users with empty 'email' field

Open nikita-vanyasin opened this issue 4 years ago • 0 comments

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:

  1. register new VK account without specifying email. (I think it became possible since around 2018, but may be earlier).
  2. 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

nikita-vanyasin avatar May 08 '20 14:05 nikita-vanyasin