google-oauth2

Callback not called for chrome.identity.getAuthToken for self hosted chrome extension

て烟熏妆下的殇ゞ 提交于 2019-12-13 02:35:38
问题 I am developing a self hosted chrome extension and have generated the key and client_id as described here. My call to getAuthToken is (copied from the answer to this question) chrome.identity.getAuthToken({ interactive: true }, function(token) { if (chrome.runtime.lastError) { alert(chrome.runtime.lastError.message); return; } var x = new XMLHttpRequest(); x.open('GET', 'https://www.googleapis.com/oauth2/v1/userinfo?alt=json&access_token=' + token); x.onload = function() { alert(x.response);

Do we need to hide the google oauth client id?

馋奶兔 提交于 2019-12-12 15:34:58
问题 everyone. I'm recently learning OAuth authentication. I'm playing around with google's oauth api. In the tutorial for Google Sign-In for server-side apps, in the third step - Initialize the GoogleAuth object, you need to provide the client id to initialize the GoogleAuth object. I'm just wondering if we need to keep the client id secret because right now anyone can find out what the client id is by looking into the javascript. 回答1: You don't need to hide the client ID, provided that you

Getting 'Refreshing due to a 401' when trying to connect using remote_api

扶醉桌前 提交于 2019-12-12 11:47:15
问题 I am trying to connect to the production datastore running on Google App Engine based on https://cloud.google.com/appengine/docs/python/tools/remoteapi#enabling_remote_api_access_in_your_app and AppEngine - Remote API returning 401 and too-many-auth and GAE: remote_api and Application Default Credentials and others. This is my code to connect to Google App Engine Datastore try: import dev_appserver dev_appserver.fix_sys_path() except ImportError: print('Please make sure the App Engine SDK is

Authenticating with OAuth2 on iOS

放肆的年华 提交于 2019-12-12 07:19:49
问题 I am currently trying to authorize my users with OAuth2. I am currently using the following library: https://github.com/p2/OAuth2 let oauth2 = OAuth2CodeGrant(settings: [ "client_id": "my-id", "authorize_uri": "https://accounts.google.com/o/oauth2/auth", "token_uri": "https://www.googleapis.com/oauth2/v3/token", "scope": "profile", // depends on the API you use "redirect_uris": ["com.TestAuthorizeApp:/oauth2Callback"], ]) //let oauth2 = OAuth2CodeGrant(settings: settings) oauth2.onAuthorize =

How to add 'field' property to a Google Drive API v3 call in JavaScript?

半腔热情 提交于 2019-12-12 06:45:36
问题 tl;dr I am new to JavaScript and Google Apps Script and I have no idea how to add the 'fields' property to a Google Drive v3 API call. I am trying to modify file permissions in a G Suite domain using Google Apps Script, a service account, and the OAuth 2 sample from Google. I wrote a function for Drive API v3 to replace Drive API v2 getIdForEmail , but API v3 requires the 'fields' query parameter to request specific fields. The error given when I run the script is: Request failed for https:/

User Impersonation with Service Account using Application Default Credentials

别说谁变了你拦得住时间么 提交于 2019-12-12 05:16:58
问题 I'm trying to use a service account with domain-wide delegation (DwD) on an App Engine deployment with Go. I've followed the steps for using Google Application Default Credentials to use a service account with App Engine. I got the code running locally on my dev machine but I'm stuck at retrieving the actual data from my domain. I'm using the Admin SDK. Under the section Delegate domain-wide authority to your service account, it says that my "service account needs to impersonate one of those

Retrieving a user's phone number from GSuite oauth?

北战南征 提交于 2019-12-12 04:55:26
问题 We're using our staff users on GSuite to authenticate with our management system which we are restricting to our hosted domain. We'd like to be able to grab our staff's phone number from their company Google account so we don't have to build separate CRUD to allow us to manage their phone number. Users are authenticated with the 'email' & 'profile' scopes. Is it possible to retrieve the user's phone number in addition to their name, email, image? 回答1: See all the Google scopes. There is a

How do I delete a list of files meeting criteria with Google Drive API and Javascript?

岁酱吖の 提交于 2019-12-12 04:45:32
问题 I want to get a list of things with get list (which I have already coded in), but next, I want a delete button that deletes all the things on that list. How can I do that with Google Drive SDK and Javascript? Example, if my criteria is: q: "starred = "+test+" and viewedByMeTime < '"+n+"" How do I delete every single file that meets that criteria? References: https://developers.google.com/drive/v2/reference/files/delete https://developers.google.com/drive/v2/web/search-parameters I tried

Embed Google Calendar only users logged into my website (not necessarily through Google) can see

点点圈 提交于 2019-12-12 03:28:36
问题 I have a .NET page which users can log into through various methods, including Google, Facebook, Twitter, and by creating a username and password directly on the site. I have a page that only logged-in users can see that has a calendar embedded. Right now this calendar is not public, and can only be seen by Google users I authorize. I could of course make it public, but then once anyone knows the url of the calendar alone they could just go there and see it. I could also share it with anyone

invalid_request with missing: scope using Google Passportjs on Google Oauth2

跟風遠走 提交于 2019-12-12 03:20:01
问题 An issues has developed in authentication code that was working perfectly up until the beginning of the year, and then seemingly broke with little change on my part, I've tried to regress to a previous version and find the cause with no luck. So I'm Looking for help in fixing the code as it exists today. I'm using nodejs v0.10.25 Passportjs to provide authentication through both Google and Facebook. My packages: "config-multipaas": "^0.1.0", "restify": "^2.8.3", "googleapis": "~2.1.5", "mocha