Added support via third-party and token-based authentication.
Fixed security issue by avoiding storing Google Account Service credentials within the application; instead, the token is obtained from a third-party API
Ref.: #8 #41
Via Third Party Authenticator
final speechToText = SpeechToText.viaThirdPartyAuthenticator(
ThirdPartyAuthenticator(
obtainCredentialsFromThirdParty: () async {
// request api to get token
final resultExample = '{
"accessToken": {
"type": "Bearer",
"data": "<token-here>",
"expiry": "2024-05-28T23:59:59.0000000Z",
},
"scopes": [
"https://www.googleapis.com/auth/cloud-platform",
],
}';
return AccessCredentials.fromJson(resultExample);
},
),
);
Via Token (bonus)
final speechToText = SpeechToText.viaToken(
'Bearer',
'<token-here>',
);
Added support via third-party and token-based authentication.
Fixed security issue by avoiding storing Google Account Service credentials within the application; instead, the token is obtained from a third-party API
Ref.: #8 #41
Via Third Party Authenticator
Via Token (bonus)