Spring : Google drive not opening window on live server

I am working on a Spring-MVC application in which I am working on Google drive integration. We tested everything on localhost, and it works fine. But now when we uploaded the code on server and we are trying to authenticate, the browser URL wont be automatically opened like it was opened in localhost for user to give permissions. What am I doing wrong. Here is my authentication code :

Controller code :

@RequestMapping(value = "/authorizeuser") public String testGoogleDrive(){ try { this.driveQuickstart.authorize(); return "redirect:/dashboard"; } catch (IOException e) { return "redirect:/denied"; } }

DriveQuickStartImpl :

@Override public Credential authorize() throws IOException { InputStream in = DriveQuickstartImpl.class.getResourceAsStream("/client_secret.json"); GoogleClientSecrets clientSecrets = GoogleClientSecrets.load(JSON_FACTORY, new InputStreamReader(in)); GoogleAuthorizationCodeFlow flow = new GoogleAuthorizationCodeFlow.Builder( HTTP_TRANSPORT, JSON_FACTORY, clientSecrets, SCOPES) .setDataStoreFactory(DATA_STORE_FACTORY) .setAccessType("offline") .build(); Credential credential = new AuthorizationCodeInstalledApp( flow, new LocalServerReceiver()).authorize("user"); if(credential!=null && credential.getRefreshToken() != null){ storeCredentials(credential); } return credential; }

In tomcat console I see this :

https://accounts.google.com/o/oauth2/auth?access_type=offline&client_id=clientid&redirect_uri=http://localhost:39174/Callback&response_type=code&scope=https://www.googleapis.com/auth/drive

in client_secret.json, I changed the redirect_uri to mysite.de and even in developer console.

{"installed":{"client_id":"clientid","auth_uri":"https://accounts.google.com/o/oauth2/auth","token_uri":"https://accounts.google.com/o/oauth2/token","auth_provider_x509_cert_url":"https://www.googleapis.com/oauth2/v1/certs","client_email":"","client_x509_cert_url":"","client_secret":"mysecret","redirect_uris":["urn:ietf:wg:oauth:2.0:oob","http://mysite.de"]}}

Any help would be nice to know what the browser URL is not opening. Thanks a lot.

Category:java Views:4 Time:2019-03-06

Related post

  • When I first open Windows Mail Live it will show not responding. After 30 seconds or so it will begin responding. 2013-05-11

    Laptop with windows 7. When I first open Windows Mail Live it will show not responding. After 30 seconds or so it will begin responding. When I try to troubleshoot compatibility, the troubleshooter does not open the program. What should I do? -------

  • I can not open Windows Live. 2014-03-02

    I can not open Windows Live. May reply that it is wrong in side-by-side configuration It is exactly this: C: \ Program Files (x86) Windows Live \ Messenger \ msnmsgr.exe The program could not start because the program side-by-side configuration is in

  • My computer will not open windows live mail . 2015-01-30

    My computer will not open windows live mail . I get an error message saying that it cannot install updates for windows live essentials . It is now telling me I need to install MFC100u.dll. Any suggestions ? I have tried to reinstall the programme but

  • c: drive not open 2012-02-15

    some viruses in my drive but when microsoft essentials remove these after that c: drive not opened. Now when I click on c then open like explore and then u know click my computer etc etc pls solve my problem --------------Solutions------------- Start

  • Google Drive not installing on Win 8 Laptop 2013-06-27

    I have downloaded the application: GoogleDriveSync a number of times .... ran it but Google Drive not showing up on my PC. Dropbox shows up just fine under Favorites but not Google Drive. Wonder what I am doing wrong. Any help appreciated. Thanks, Ro

  • My Microsoft starter will not open windows documents sent to me by email anymore 2013-03-05

    About 3 weeks ago my Microsoft starter will not open windows documents sent to me by email anymore. I can still create documents but cannot open any unless they are sent in PFD files. Any suggestions??? --------------Solutions------------- Are you tr

  • system can not open, can not open Windows Defender, MSE same can not be opened. and now sound speakers already gone. 've tried all sorts of ways but the same too. 2013-11-04

    system can not open, can not open Windows Defender, MSE same can not be opened. and now sound speakers already gone. 've tried all sorts of ways but the same too. I already uninstall MSE and install again but failed. when I try to open the system, Wi

  • Internet 11 not opening windows 2014-02-11

    I have a laptop with a 64 bit quad-core processor at 1,5GHz, 8 GB of ram, 225 GB of free space on my hard drive, and Windows 7 with the latest updates. I got upgraded to IE11 without my knowledge or consent. Since that has happened, I cannot open web

  • IE8 not opening Windows/Microsoft update,its apparently in restricted sites.How do I get updates working again? 2012-02-13

    IE8 not opening Windows/Microsoft update,its apparently in restricted sites.How do I get updates working again? --------------Solutions------------- Hi, Is the Microsoft update website in restricted sites list? Remove it from the restricted sites lis

  • could not open window media player 2012-04-18

    I could not open window media player because its configuration setting might be set incorrectly and window media library has been corrupted, so what should i do? --------------Solutions------------- 1 Media player library troubleshooter http://window

  • I can not open Windows Media Player. I click on it and nothing not even a pop up box. How do I fix it or repair it. 2012-05-16

    I can not open Windows Media Player. I click on it and nothing not even a pop up box. How do I fix it or repair it. I have Vista. I think it is Windows 10 but I do not know how to look. I have a basic understanding of computers. So I would need a det

  • Windows Store is not opening, Windows 8.1 2012-11-23

    Hi, I have a Lenovo g580 laptop with windows 8, which i recently upgraded to windows 8.1. Windows store was working as it worked before upgrading. But recently I don't know why it stopped working, and shows a forever loading. It keeps on loading and

  • have a lot pages can not open, windows can not detect network's proxy settings 2013-03-15

    have a lot pages can not open, windows can not detect network's proxy settings --------------Solutions------------- Hi Tony, The issue description seems a bit unclear, please reply us with more information. What do you mean “have a lot pages can not

  • Computer is not opening Windows 2010 start up 2013-03-20

    my computer is not opening Windows 2010 start up, I can't open or create a document. Computer tells me to try again or fix in Control panel and I have tried the Click to run appli. What to do --------------Solutions------------- What is Windows 2010?

  • winows password lost will not open windows 2013-07-18

    wind ows 2000 password lost will not open windows --------------Solutions------------- Keeping Passwords Secure- Microsoft Policy on Passwords http://support.microsoft.com/kb/189126 What to do if you forget your Windows password: http://windows.micro

  • I can not open Windows word starter, nor can I read window files 2013-12-07

    I can not open Windows word starter, nor can I read window files. All the rest is working, including Windows photo gallery. --------------Solutions------------- You need to click on change and then perform a repair of the Office Starter edition. Offi

  • could not open windowif u have blocker instzlled please make sure is disable tried that no luck 2014-07-03

    aol could not open window if u have a blocker installed make sure it is disable tryed that no luck --------------Solutions------------- Hi whiteey23, Welcome to Microsoft Answers! Even though you’ve disabled the pop-up blocker as mentioned in the err

  • I can not open Windows Live Mail 2014-10-11

    Question Summary I can't open Windows Live Mail Please provide your impacted Email address : *** Email address is removed for privacy *** Which version of Windows Live Mail are you using ? Other Choose your Operating System version : Windows 7 How lo

  • Live tiles not working, apps will not open Windows 8 2013-11-07

    I recently updated to Windows 8 Pro from Windows 7 Pro, a week ago maybe, and everything was fine. All the apps were working etc. but now no apps will open, including official Microsoft ones like the weather app. All the tiles appear to be live and u

  • Google Drive App on Windows 8.1 not working 2014-01-14

    I tried uninstalling, reinstalling to no avail. Since the update to Windows 8.1, the Google Drive software stopped syncing and there is no icon in the InfoBar. I'm fairly sure it doesn't run at all. Anyone else with this issue? Is there a solution? -

  • Internet Explorer 7 will not open Windows Live Hotmail after signing in. 2014-01-20

    I have been using Internet Explorer 7 (default browser) and Google to acess my Windows Live Hotmail account. Since I have installed Mozilla/ Google as an alternate browser I can no longer sign into my Hotmail account through IE. IE allows me to acces

  • Could not open Windows Live file through Save and Send 2014-02-05

    Hi, I need help sending files to my windows live account directly from my Office 2010 trial software. I click on save and send, sign in to windows live, and choose the file I want to send to. Then, once I click save as the program pops up with an err

  • can not open windows live gallery 2014-03-19

    I was using windows live gallery closed it and can not get it to open again, I do not understand Microsoft why all their programs suck so bad..I have tried everything now I can not get to my pictures..Bill gates is so rich because he gets people to b

  • Google maps InfoWindow not opening window on map when link click event 2016-11-13

    Info window not opening on map view debugging without any errors . But am not getting whats wrong with my code Info window not opening. Here is my code columns.Bound(e => e.AssetNumber).Template(@<text></text>).ClientTemplate("<a st

  • Can not open Windows Live Hotmail e-mail. Shows: default.aspx line:3070. 2013-04-24

    can not open email shows default.aspx line:3070 original title: hotmail --------------Solutions------------- Unfortunately this forum is not for Hotmail - they have a dedicated forum for questions where you will receive the best assistance. When you

Copyright (C) dskims.com, All Rights Reserved.

processed in 0.198 (s). 11 q(s)