google / google/googleapis.dart
The given string does not have the correct begin/end markers expected in a PEM file.
- Dominant language
- Dart
- Stars
- 419
- Forks
- 136
- Avg merge
- 1h 21m
- Merged PRs (30d)
- 5
Description
I'm using package:googleapis_auth/auth_io.dart to login as a service account in Flutter.
`
Future obtainCredentials() async {
var accountCredentials = ServiceAccountCredentials.fromJson({
"private_key_id": "de1234567890",
"private_key": "my-services-12345",
"client_email":
"test@my-services-12345.iam.gserviceaccount.com",
"client_id": "1234567890",
"type": "service_account"
});
var scopes = ["https://www.googleapis.com/auth/cloud-platform"];
var client = http.Client();
AccessCredentials credentials =
await obtainAccessCredentialsViaServiceAccount(
accountCredentials, scopes, client);
client.close();
debugPrint(credentials.toString());`
But as soon the script starts I'm getting the error
`The given string does not have the correct begin/end markers expected in a PEM file.`
pointing to
`ServiceAccountCredentials.fromJson`
Contributor guide
Assessment
This issue has not been assessed yet.