New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for Google Authorization Server state param? #80
Comments
Is using a rails session value not more easy and failure save? |
I don't know how obvious that solution is to most people, but could you outline your suggestion in a little more detail? I'm trying to redirect the user back to a specific page that won't always be the same. I need to be able to pass through an object's id. One problem with this though, is that I don't want to have to add a ton of valid redirect url's to my google developer console. Does this mean that dynamic redirect url's are not available? |
@jakehockey10 ... my pull requests were merged, #88 and #89, that should allow you to pass through that url or any piece of information that you would need to handle your redirect using the state param. I am doing something like: %a{href: "/invites/contacts/gmail?state=#{some_custom_users_url(@user, @Custom)}"} So the value of state will be pass through and back to your callback url and then you do stuff and redirect to the url that you passed in the state param or if it's just the user_id you are passing you can use that to build your url. Does that make sense? |
Yea that is kinda making sense. Thanks for the quick reply! So here is the link as I've constructed it through ruby on rails helpers: Is there someplace else more specific that I'm supposed to grab this state parameter from? The params object in the controller in the oauth2callback action does not consist of this state parameter. Thanks again for your help thus far! |
I hope I didn't make you look into this too much here...I realized that I was still using 0.3.4. After getting 0.3.5, I was seeing the 'omnicontacts.user' element of the request ( I wasn't before ) and I started to see the query_string/query_hash elements of the request. Thanks for pointing me in the right direction! |
Hi
Does your library support passing a state param for Google requests?
https://developers.google.com/accounts/docs/OAuth2WebServer#libraries
I need to pass through some data so I know where to redirect the user to and this seems to be the param to do so.
Just wondering if this is something I can do with this gem or not? And if so, how?
Thanks in advance!
Shane
The text was updated successfully, but these errors were encountered: