Google OpenID Login Integration

I followed the google oauth tutorial to implement the login to openId for my application.

I used https://www.google.com/accounts/o8/id, but some, like web browsing, not displaying the Google login page in the emulator. Only a blank page is displayed.

Here is my corresponding piece of code. Any inputs?

Intent intent = new Intent(this, WebViewActivity.class);
                intent.setData(Uri.parse("https://www.google.com/accounts/o8/ud"));
                startActivityForResult(intent, 0);

WebViewActivity code:

 protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        // Allow the title bar to show loading progress.
        requestWindowFeature(Window.FEATURE_PROGRESS);

        WebView webview = new WebView(this);
        setContentView(webview);

        // Load the page
        Intent intent = getIntent();
        if (intent.getData() != null) {
            webview.loadUrl(intent.getDataString());
        }
................
}

My web application uses it OpenId, so OAuthit’s not an option for me.

+4
source share
1 answer

I do the same as indicated in the sample.

When I tried to open the URL, you mentioned https://www.google.com/accounts/o8/id

I get the following screen.

enter image description here

url https://www.google.com/accounts/o8/ud, https://accounts.google.com/o/openid2/auth

-

enter image description here

, url

https://accounts.google.com/o/oauth2/auth?  client_id = 424911365001.apps.googleusercontent.com &  response_type = &   = %20email OpenID &  redirect_uri = https://oa2cb.example.com/&   = security_token% 3D138r5719ru3e1% 26url% 3Dhttps://oa2cb.example.com/myHome&  login_hint=jsmith@example.com&  openid.realm = example.com &  HD = example.com

https://developers.google.com/accounts/docs/OAuth2Login#sendauthrequest

, , , , , . , - Wi-Fi . 2g 3g.

Open Id

https://developers.google.com/accounts/docs/OpenID#settingup ( )

https://developers.google.com/accounts/docs/OpenID#endpoint

+1

All Articles