I follow this guide to create a login button.
https://developers.google.com/+/web/signin/server-side-flow
But I donโt see how the anti-fake state is transmitted to the button fragment (step 4).
Should there be a parameter, for example, the data state for the button?
The full tutorial does not mention how the status code is passed from the page to the google server and back to my signInCallback function.
<div id="signinButton"> <span class="g-signin" data-scope="https://www.googleapis.com/auth/plus.login" data-clientid="YOUR_CLIENT_ID" data-redirecturi="postmessage" data-accesstype="offline" data-cookiepolicy="single_host_origin" data-callback="signInCallback"> </span> </div>
Then, in step 6, I donโt see how the state is passed to the ajax server call. So how does this if-condition work in step 7?
if request.args.get ('state', '')! = session ['state']:
Thanks for any help in advance.
source share