2.4 – OAuth2 First, save your OAuth2 provider configuration into a JSON file, for example: { "providers" : [{ "name" : "Google", "client_id" : "650561938988-t2r66k1ms3hpoi3k1e2g7l2adlarau8s.apps.googleusercontent.com", "client_secret" : "-D-nhxWn2E97tZWWLg5IQ6Ak", "request_uri" : "https://accounts.google.com/o/oauth2/auth", "redirect_uri" : "http://localhost/oauth2callback", "access_token_uri": "https://oauth2.googleapis.com/token", "auth_uri": "/login_chrome.html", "scope": "openid email" }, { "name" : "Live", "client_id" : "0000000040133A31", "client_secret" : "p9WwBr2Pyrq6mtaeZCwTSwqbIF39Br3Z", "request_uri" : "https://login.live.com/oauth20_authorize.srf", "redirect_uri" : "http://www.remotespark2.com/oauth2callback", "access_token_uri": "https://login.live.com/oauth20_token.srf", "scope": "wl.emails", "profile_uri": "https://apis.live.net/v5.0/me" }] } Second, specify the position of this file in gateway.conf: oauth2 = \\user\\local\bin\\SparkViewGateway\\oauth2.json For more information, please check the source code of login.html.