Git Product home page Git Product logo

gplus-quickstart-java's Introduction

gplus-quickstart-java's People

Contributors

cartland avatar gguuss avatar hanxue avatar joannasmith avatar silvolu avatar vicfryzel avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gplus-quickstart-java's Issues

Including bin directory and client_secrets.json

Hello @gguuss , thank you very much for sharing this straightforward example of Java Google+ authentication.

I notice in the instructions the developer will have to

  1. Create the bin directory
  2. Rename or copy client_secrets.json.example to client_secrets.json

In the spirit to make it simpler, why not create an empty bin directory, and simply name the client_secrets file as client_secrets.json ? Should be obvious enough for the developer to see YOUR_CLIENT_ID and YOUR_CLIENT_SECRET and replace it with the appropriate values.

Token Verification

The developer guide goes through quite a few more steps to verify the token than this sample app does.

The code there more closely resembles the gplus-verifytoken-java sample. But the README for that suggests those checks are important for tokens received from the client (and not via the one-time-code flow).

In my mind, it does not make sense that the code in the developer docs is issuing a second TokenInfo request to further verify the token. It seems every assertion they make against the result is already covered by a successful GoogleAuthorizationCodeTokenRequest.

JS TypeError blocks the application

When I tried the application clicking on the G+ button nothing happened. I turned on Firebug and I get this error message

TypeError: can't convert authResult[field] to primitive type

$('#authResult').append(' ' + field + ': ' + authResult[field] + '<br/>');

localhost:4567 (line 87)

For me the solution was to eliminate the output of the 'status' variable:
index.html lines 87-89

        if (field != 'status') {
          $('#authResult').append(' ' + field + ': ' + authResult[field] + '<br/>');
        }

http://localhost:4567/people in not accessible

I don't get the connections list when the main page loads. Javascript notifies me about a HTTP 500 problem. When I tried to access that page directly I get this message:

http://localhost:4567/people
HTTP ERROR: 500

Problem accessing /people. Reason:

com.google.api.client.auth.oauth2.Credential.<init>(Lcom/google/api/client/auth/oauth2/Credential$Builder;)V

Powered by Jetty://

400 Error on clicking sign in

I'm trying out this sample, but I'm just getting:

  1. That's an error.
    The page you requested is invalid. That's all we know.

I've configured a web application in Google Cloud Console, with an OAuth 2.0 Client ID, with web origin of http://localhost:4567.

Iam getting invalid client error.

in google play console i created the 1)productname "gplus-quickstart-java-master"
project name also "gplus-quickstart-java-master"
2)given the email id of mine
3)my client_secrets.json file details are below
Client ID: XXXXXXXXXXXXXXXX
Email address :XXXXXXXXXXXXXXXX
Client secret :XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Redirect URIs :http://localhost:8008/oauth2callback
Javascript Origins : http://localhost:8008
iam running on local host port number 8008

myerror dialog url when iam clicking on sign in button is below

https://accounts.google.com/o/oauth2/auth?client_id={{%20CLIENT_ID%20}}&redirect_uri=postmessage&response_type=code%20token%20id_token%20gsession&scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fplus.login&access_type=offline&request_visible_actions=http%3A%2F%2Fschemas.google.com%2FAddActivity&cookie_policy=single_host_origin&include_granted_scopes=true&proxy=oauth2relay503561546&origin=http%3A%2F%2Flocalhost%3A8008&state=467093370|0.3151933772&&e=3100077

what was my issue.any thing went wrong please help me

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.