Skip to content

Latest commit

 

History

History
13 lines (8 loc) · 1.39 KB

google_desktop.md

File metadata and controls

13 lines (8 loc) · 1.39 KB

Google Login for Desktop Clients

Note: A Desktop is a system that doesn't have google's SDK support and is able to launch a web view, such as Java GUI, .NET GUI and so on.

You will follow Google's Installed Applications flow, get the auth code and send it to http://your-backend/token/new/social/by-auth-code/google/desktop .

Steps

  1. Create a Google Client ID. Pick "Other" on "Application type" selection.
  2. See googleCodeLoginBtn.addActionListener(). You will construct the facebook auth url, launch it with a web view inside your client application.
  3. See WebEngineChangeListener.changed(). You will monitor the browser's URL until you get the auth code, and then send the code to srb4j's back end.
  4. The back end's code is getEmailFromCode. You don't need to change it, but you will set "googleClientId" and "googleClientSecret" on app.properties.