Skip to content
This repository was archived by the owner on May 13, 2019. It is now read-only.
This repository was archived by the owner on May 13, 2019. It is now read-only.

Google Sign In Issue #20

@nkm-dev

Description

@nkm-dev

I have written the following code to integrate the Google Sign In.
`<%@ Page Title="login" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="Login.aspx.cs" Inherits="Login" %>

<asp:Content ID="Header" ContentPlaceHolderID="headContentPlaceHolder" Runat="Server">

<script type="text/javascript">
(function () {
var po = document.createElement('script');
po.type = 'text/javascript'; po.async = true;
po.src = 'https://plus.google.com/js/client:plusone.js';
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(po, s);
})();
</script>
</asp:Content>
<asp:Content ID="Body" ContentPlaceHolderID="BodyContentPlaceHolder" Runat="Server">


sign in





sign in to place your order!







sign in


Or choose from the following sign in methods.

Twitter
Facebook
<%--Google+--%>
<%--
--%>


<%--<div id="gConnect">
    <button class="g-signin"
        data-scope="https://www.googleapis.com/auth/plus.login  https://www.googleapis.com/auth/userinfo.email "
        data-requestvisibleactions="http://schemas.google.com/AddActivity"
        data-clientid="538471399363-nbfgv00mksir2cnh2fi4vfld8nfqhuv3.apps.googleusercontent.com"
        data-accesstype="offline"
        data-callback="onSignInCallback"
        data-theme="dark"
        data-cookiepolicy="single_host_origin">
    </button>
</div>--%>
<script type="text/javascript">
    function onSignInCallback(authResult) {
        if (authResult['access_token']) {
            var loc = '/?accessToken=' + authResult['access_token'];
            window.location.href = loc;
        }
        //var str = JSON.stringify(authResult);alert(str);
    }
</script>

</asp:Content>`

It's not working in IE but working in Chrome.
Request got stuck on below url while in IE after after entering credentials.

https://accounts.google.com/o/oauth2/auth?client_id=538471399363-nbfgv00mksir2cnh2fi4vfld8nfqhuv3.apps.googleusercontent.com&redirect_uri=postmessage&response_type=code%20token%20id_token%20gsession&scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fplus.login%20https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.email&access_type=offline&request_visible_actions=http%3A%2F%2Fschemas.google.com%2FAddActivity&cookie_policy=single_host_origin&include_granted_scopes=true&proxy=oauth2relay1966652252&origin=http%3A%2F%2Flocalhost%3A11761&gsiwebsdk=1&state=1078229923%7C0.022402776350047264&&e=3100077&jsh=m%3B%2F_%2Fscs%2Fapps-static%2F_%2Fjs%2Fk%3Doz.gapi.en_GB.gesYOH10IyQ.O%2Fm%3D__features__%2Fam%3DAQ%2Frt%3Dj%2Fd%3D1%2Frs%3DAGLTcCPGlvlHVANs8R14d_NyG-YXq_5opA

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions