User Tools

Site Tools


en:public:developer:template_system:tags:authentication:google_oauth2callback

This is an old revision of the document!


<#google_oauth2callback>

This function check the google OAuth 2.0 authentification (https://developers.google.com/accounts/docs/OAuth2WebServer), if success login the user or register him.

Parameters

Name Mandatory Description
template No Used to build the content of the result

Example

<#{google_oauth2callback>
  <#{template>
    <script type="text/javascript">
    //<![CDATA[
    <#if condition="<#AMRequest.values['error'] checksum=1>">
      var success = false;
    <#else>
      var success = true;
    <#endif>
 
    (function(){
      if((window.opener !== null) && success){
        window.opener.location = window.opener.location;
      }
      window.close();
    })();
    //]]>
    </script>
  <#}template>    
<#}google_oauth2callback>
en/public/developer/template_system/tags/authentication/google_oauth2callback.1365173350.txt.gz · Last modified: 2013/04/05 18:49 by svanderclock