umgc / fall2022

SWEN 670 Fall 2022 cohort
Creative Commons Zero v1.0 Universal
4 stars 3 forks source link

Google Cloud Vision (used for the scanning function) doesn't work (expired subscription) #193

Closed mdconatser closed 2 years ago

JesterSe7en commented 2 years ago

Credentials will not be provided by previous course. It is probably not a good idea to have these credentials pushed to a public repository.

Credentials are expected in the /assets/credentials.json.

If you wish to play around with Google Vision API, you will need to create your own personal service account with Google. There is a free tier up to 1000 images.

I followed the steps provided in https://cloud.google.com/vision/docs/setup

Overall steps are...

  1. Create a project within Google Cloud
  2. Enable the Google Vision API (ensure the project you want to associate is selected in previous step)
  3. Go to service account page (https://console.cloud.google.com/projectselector/iam-admin/serviceaccounts/create?supportedpurview=project)
  4. Select your project
  5. Under the Keys tab at the top, click on add key -> create new key
  6. Select json. A json file should automatically be downloaded
  7. Move that json file to /assets/
  8. From here, the test suite can access Google's API. Credentials are managed within the code by google_credentials_provider.dart
JesterSe7en commented 2 years ago

Pull request created https://github.com/umgc/fall2022/pull/316

shaneknows commented 2 years ago

I'll hop on this ticket and can add my credentials to the secrets for the repo I suppose. Professor said he would reimburse us if it goes over