1

I am trying to use googleapis_auth flutter package to obtain credentials, but stick with var scopes = [...]; what does I need to fill in the var scopes

import "package:googleapis_auth/auth_browser.dart";

...

var id = new ClientId("....apps.googleusercontent.com", null);
var scopes = [...];

// Initialize the browser oauth2 flow functionality.
createImplicitBrowserFlow(id, scopes).then((BrowserOAuth2Flow flow) {
  flow.obtainAccessCredentialsViaUserConsent()
      .then((AccessCredentials credentials) {
    // Credentials are available in [credentials].
    ...
    flow.close();
  });
});
Tushar Rai
  • 2,371
  • 4
  • 28
  • 57

1 Answers1

0

Auth scopes express the permissions you request users to authorize for your app. You can get details about what scopes you might need to add to your auth req here

But, googleapis_auth package is meant to be used with web projects only, it can not be used in flutter project.

If you want to implement google auth, try firebase_auth which allows google authentication using firebase backend.

Ganapat
  • 6,984
  • 3
  • 24
  • 38