VK provider returns error for users with empty 'email' field
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 6.6k
- Forks
- 631
- PR merge metrics
- No merged PRs in 30d
Description
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`
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the goth/provider/vk implementation and tracing how gothic.CompleteUserAuth handles a VK user with no email. Reproduce the authorization flow with an empty email, then determine the compatibility-safe behavior for missing email and verify that CompleteUserAuth returns no error for that case.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- authentication
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100