Closed oleksandrhubachov closed 8 years ago
Hi, thanks for using the library. So that's pretty strange actually. What OAuth provider are you using?
For the OAuth state parameter, the library generates a random alphanumeric string and stores it in the session. See OAuth2AuthenticationEntryPoint. The OAuth provider should echo this value back as a parameter in the redirect. This must match the original value. See github's docs as an example explanation - https://developer.github.com/v3/oauth/
What's weird is that both the original value in the session is being reported as null, as well as the value sent by the OAuth provider.
Is the session definitely the same when processing the callback? Can you confirm that the redirect to the OAuth provider contains state as a parameter? You could also put a breakpoint in OAuth2AuthenticationEntryPoint.commence(). Can you confirm whether the callback from the OAuth provider contains state as a parameter?
Are you trying to open /internal link directly in your web browser? That won't work, it is only designed to be called back to from the OAuth provider. If that's what you're doing, then the library is working as designed.
Thanks
Hi,I am new to oauth and open id authentication. Now I need to implement in my application.I want to use your library can you give me complete example how to use your library . I tried using it .. but what are the things i need to code in in user facade .Please help
Hello! I have issue using your library.
Authentication Failed: Received states null was not equal to original state null
This is the exception I got after using your classes. I checked xml and everything looks good. This is my xml:`
And when I try to open
/internal
link in my app, this exception appears. What I'm doing wrong?