My App name is not shown #323

Closed
AdiSegev opened this Issue Nov 11, 2012 · 3 comments

Comments

Projects
None yet
3 participants

Hi all,
I've using Scribe's library to get ouath authentication for my app.

But, when the user is redirected to the first page, and being asked to get premmission to my app, my app name isn't shown, but the app key/client id :(############.apps.googleusercontent.com).

how can i get my real app name get shown?

when i've try doing it without scribe, i could get it worked.

Thanks.

Collaborator

fernandezpablo85 commented Nov 11, 2012

What's the "app name"? isn't this a google api bug? how did you get it to work without scribe?

Please be more specific

Hi, thanks for the reply.

  1. before i saw Scribe library, i've used the following code to get the user premmision page from google (according to google's ouath flow using server):

if ("google".equalsIgnoreCase(accountName)) {
response.sendRedirect(response
.encodeRedirectURL(("https://accounts.google.com/o/oauth2/auth?"
+ "scope=https://www.googleapis.com/auth/userinfo.profile&"
+ "redirect_uri=http://localhost:8080/accountsLogger/&"
+ "response_type=code&approval_prompt=force&state=google&"
+ "client_id=1089431505934-ia8thur3nmffgfbli0so1oomrocnac60.apps.googleusercontent.com")));

when i did this, the user was navigated to googles page asks: "the site Accounts Logger Website (my app name) is requesting...." and the user could deny or accept.

  1. When l found Scribe,i've tried the following code (according to google example):

public class GoogleExample
{
private static final String NETWORK_NAME = "Google";
private static final String AUTHORIZE_URL = "https://www.google.com/accounts/OAuthAuthorizeToken?oauth_token=";
private static final String PROTECTED_RESOURCE_URL = "https://www.googleapis.com/auth/userinfo.profile";
private static final String SCOPE = "https://www.googleapis.com/auth/userinfo.profile";

public static void main(String[] args)
{
OAuthService service = new ServiceBuilder()
.provider(GoogleApi.class)
.apiKey("1089431505934.apps.googleusercontent.com")
.apiSecret("qAZyPVw2alUCTad5pBCbHQPG")
.scope(SCOPE)
// .callback("http://localhost:8080/MBankWeb1/google.html")
.build();
Scanner in = new Scanner(System.in);

System.out.println("=== " + NETWORK_NAME + "'s OAuth Workflow ===");
System.out.println();

// Obtain the Request Token
System.out.println("Fetching the Request Token...");
Token requestToken = service.getRequestToken(); 

But,when google is redirecitng the user to the user premmision page, it asks " the site 1089431505934.apps.googleusercontent.com is requesting...".

my question is how to make google to show the app name (accounts logger website) and not the Api key.

thanks again for the help.

Just nitpicking but in your examples your using different client_id's (in the first example 1089431505934-ia8thur3nmffgfbli0so1oomrocnac60.apps.googleusercontent.com and in the second example 1089431505934.apps.googleusercontent.com).... maybe that's why?

Do you have the correct branding information set in API Access (https://code.google.com/apis/console/b/0/)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment