I am getting this error testing in-app subscription products locally.
authentication is required. you need to sign in to your google account
The following worked for me launching from my IDE (Android Studio)
1) Go to your https://play.google.com/apps/publish/ Under 'Developer' Account/Settings/Account details/License Testing
2) Add the 'Default Google Play' email address that corresponds with the device you are testing
Source: https://engineering.memrise.com/faster-in-app-billing-subscriptions-testing-8e68551b4e2f