Datastore on Google Cloud Platform Oauth2 error and Data disappearing - oauth-2.0

I have recently lost all access to Google Cloud Platform Datastore for my app. I have records missing completely from my app and when I tried to check the data through the google cloud platform console I can no longer see any data or indexes.
I receive the following error when I try to view entities (no entities show up in the list anymore and this error appears if I try to manually enter a value in the kind field)
"Request had invalid authentication credentials. Expected OAuth 2 access token, login cookie or other valid authentication credential. See https://developers.google.com/identity/sign-in/web/devconsole-project"
When I try to view indexes I receive a "Failed to load" error.
I have lost access to my database completely and I'm uncertain where to go from here. The app I'm using if for our CMS for our homeless charity which includes rental and tenancy information, sales information from our op shop and foodbank, and lots of client information regarding homelessness, mental health, counselling and addiction records.
Some of my clients have completely disapppeared from our system. I don't know how to save my data. Please help.
UPDATE : have been able to access datastore by updating google chrome, this has fixed the Oauth2 issue. While I can now see the data, this hasn't fixed the issue of the missing records. I'm currently migrating and updating my app from appengine ndb to cloud ndb and python 2 to python 3. I'm hoping this prevents future losses, but i've lost faith in the integrity of google datastore.

Related

HTTP 403 error when fetching data from Google Classroom API with Swift iOS

I made an iOS app (Swift) that signs in with Google, then fetches classroom data from the (Google Classroom API) https://developers.google.com/classroom. Everything was working correctly, and then some time later I think I accidentally deleted the Google Cloud project associated with it. So I had to re-create it and recreate an OAuth Client ID (I followed this guide on Google's website).
Now I'm getting an https status code 403 error - Permission Denied while trying to fetch classes, and I have no idea why. Does anyone know how to resolve this?
I believe the specific error (according to the Google Classroom API error section, linked above) is:
...but I'm very confused what to do to fix this.
One thing that is interesting is when I created an OAuth Client ID and downloaded the credential.plist (or credentials - can't remember) file and inserted it into the Xcode project, I get the same error as when the .plist file is not there. I'm wondering if I have it named something incorrectly? (Because before I had an entire GoogleService-Info.plist file since I had an associated Firebase project), but now that I don't need the firebase project anymore, I just have the credentials in the downloaded plist file which inherently is called credentials.plist.
Edit One strange thing is that I am only trying to read data, so I don't know why it's telling me I attempted to modify data.
If you are using some of the API to manage the classwork from the students with the Classroom API, you could be affected by this alert:
This could be interpreted in a way that, all the CourseWork that was managed by the previous Client ID is basically linked to that Client ID. This also has been discussed over the public issue tracker when it comes to Classwork created from the normal UI and how it can be managed:
https://issuetracker.google.com/issues/67748271#comment8
I would suggest to also share some feedback for this feature request so it gets the attention it needs. I notice that features like this for Classroom have been approved and implemented due to the high amount of users utilizing Classroom, generally it was previously limited however it has since been getting great support.

Accessing Google IAP OAuth 2.0 protected website using C# .NET - error getting tokens in OAuth Playground

One of the websites we used to get data from requires now log in via Google, I have been granted access, and want to update the app to continue working.
I've set up credentials (clientId, clientSecret) as well as service account - whichever is easier tbh.
The url I'm trying to access looks like "https://xxxxxxxxxxxxxx.appspot.com/view/company_name"
When logging in manually, I'm being informed that:
To continue, Google will share your name, email address, language preference and profile picture with iap.googleapis.com.
Trying to get it working first on:
https://developers.google.com/oauthplayground/
But each time I select scope (guessing here) Google OAuth2 API v2 (userinfo.email, userinfo.profile) and get the tokens I end up receiving following error message:
Invalid IAP credentials: Expected JWT to have 3 parts separated by a '.' but there are 2 parts
Could anyone tell me all the things I'm doing wrong here?

What has changed in Microsoft oAuth 2.0 implementation?

I have a web site that has been using Microsoft accounts for authentication for more than three years. It is a Node web app and is using the passport-windowslive package.
Lately, when users return from login.live.com after logging successfully using their Microsoft accounts, one of two types of errors is received, sometimes:
The provided value for the input parameter 'scope' is not valid. The target '«my web site domain»' does not exist.
or:
The provided value for the 'code' value is not valid. The code has expired.
The error is sporadic. I am unable to reproduce it on my development machine.
As the passport-windowslive package was last changed four years ago and my code has not changed for more than two years, the cause looks like it's at the Microsoft end. What has changed?
Update: The problem is getting worse. Previously, the problem could sometimes be overcome by using an incognito browser session or changing the browser. Now it's happening on all browsers. But I am still unable to reproduce the error when running on localhost (with no http).
Microsoft has changed how its applications can be used for oAuth. They must now be managed from Azure instead of apps.dev.microsoft.com or Microsoft Live.
Existing applications configured in apps.dev.microsoft.com will result in:
AADSTS700016: Application with identifier '000000xxxxxxx' was not found in the directory 'aaaaaaaa-bbbb-cccc-ddd-eeeeeeeeeeee'. This can happen if the application has not been installed by the administrator of the tenant or consented to by any user in the tenant. You may have sent your authentication request to the wrong tenant.
The passport-windowslive module somehow did not bubble up the error response.

Setting up Google Calendar API

I'm trying to use the Google Calendar API in one of my projects. To do so, I need to set up OAuth access in the Google API console.
But when creating the consent-form (which is required to use OAuth), I get a meaningless error message:
The translation is as follows:
A problem occured. Please check your data and try again . If you have
not given any details, the problem may solve itself . In this case, we
recommend that you wait and try again later.
I have set the E-Mail address and project name. The optional fields were left blank.
So far I have not been able to solve the problem. I tried to wait for hours/days. I tried three different browsers. I also tried to contact Google support. All without success.
After days of trying, this is the solution:
Create another Google account
Using your old account, add the new account as an owner to your Google API project in the console
Log in with your new user account and accept the invitation
Create the OAuth consent form with the new user account
I have no idea WHY this worked, but it did.

SalesForce API: OAuth authorization error 1800

I am brand new to SalesForce development, and want to explore the API and its capabilities. I have created a new Developer Edition account. I have not yet tried to access the API programmatically, but I am trying (unsuccessfully) to access it via both the Workbench ( https://workbench.developerforce.com/login.php ) and the Apigee Console ( https://apigee.com/console/salesforce ).
For some reason, in both cases I'm redirected to a URL with OAuth error code 1800 (e.g. https://na15.salesforce.com/setup/secur/RemoteAccessErrorPage.apexp?oauth_error_code=1800&display=popup in the Workbench case). At this URL, I am getting a screen with the text "Remote Access Authorization Error" - "There was a problem in setting up your remote access". What am I doing wrong?
Some additional details:
I can log into SalesForce just fine, the problem only occurs with API/OAuth access
I have not touched anything in my brand-new Developer Edition account, except for (1) populating it with some sample data (Leads, Accounts, Contacts), and (2) resetting the security token (through "My Personal Information" -> "Reset My Security Token")
On the WorkBenh login screen, it does not matter which API version I choose (tried 24, 25 and 26), and I am using "Production" for the Environment since my login doesn't seem to work at all for Pre-Release or Sandbox
(not a real answer, I expect to update it frequently as the situation develops)
Weird.
Yes, Developer Edition is a "Production" as far as connecting apps are concerned. You might have to file a Case with Salesforce Support (Help&Training link in the upper right corner).
Workbench does use API (and probably so does this Apigee thingie) but if you're using your username & pass I don't see how it might go to OAuth...
Can you download any other SF-related tooling (Data Loader, Force.com IDE, Real Force Explorer, Excel Connector, some iPad/Android app... hell, Chatter for Desktop even) and try the connectivity?
Sometimes API products don't display special field for the security token (which you can bypass by entering longer string in the password field: "passwordSecurityToken") but Workbench never asked for a token when I was accessing my Dev. Edition.
There was an issue with OAuth on NA15, but should be resolved now. I tested with Workbench with a brand new NA15 org and its working as expected.
I've run into this when I try and "short circuit" the auth url by decoding the startUrl param and going straight to it in a tab that's already logged in. For example
login to some org on na14.salesforce.com
click sfdx authorize an org in vs code with default url
get sent to a url like https://login.salesforce.com/?startURL=%2Fsetup%2Fsecur%2FRemoteAccessAuthorizationPage.apexp%3Fsource%3D<long_base64_encoded_string>
use a url decoder (i.e. https://meyerweb.com/eric/tools/dencoder/) to translate that to https://login.salesforce.com/?startURL=/setup/secur/RemoteAccessAuthorizationPage.apexp?source=<long_base64_encoded_string>
change the url to match the domain i'm logged in as, i.e. https://na14.salesforce.com/?startURL=/setup/secur/RemoteAccessAuthorizationPage.apexp?source=<long_base64_encoded_string>
go through the standard oauth grant
success
For the most part that works fine, but in some cases I get that wonderful oauth error 1800. In those cases I've been able to work around the issue by specifying the specific domain my instance is on when starting the oauth authorization. Using the above example for step 2 I would chose https://na14.salesforce.com for the the url (other oauth flows typically provide a similar custom url input, but ymmv). Voila, step 7 is successful.
Can't say for sure if that's exactly what will happen for others.

Resources