Closed JustMikey closed 6 years ago
Oh, I see. @JustMikey can you provide a fix?
This feature was initially implemented by @Virviil so you can consult him for any questions.
@JustMikey Did you check the functionality?
It seems to me, that even when you don't provide state it's still passed as empty parameter like this. (empty state with state=
So, it can be parsed properly with Plug.
Just got an email from a person who was not able to use the new version without state
.
This is a confirmed bug. @Virviil any ideas how to deal with it?
And could please help me to figure out good testing strategy that both version (with and without state
) work?
@sobolevn Basically saying I changed cassettes directly, instead of running the code with my token. So, I think that the best testing strategy will be run it with real VK requests.
I can try to do it myself - but then I'll ask you to make testing.md
file with description how to add tokens, which tests to run and so one.
The fastest fix is to add one more handle_callback!
implementation without state
in pattern matching.
Better way will be to test different VK responses and develop suitable code.
Here's a pull request with a failing test. https://github.com/sobolevn/ueberauth_vk/pull/22
So the pattern matching to handle state was added here but the problem is that it may not be there and then it simple doesn't pattern match and we get the missing code error. State should be extracted without breaking the pattern match.