Google Symfony 3 应用的 Play Market 身份验证

Google Play Market Authentication for Symfony 3 app

如何通过 Google Play Market 帐户为我的 Symfony 3 应用程序配置身份验证和授权?我试图将 FOSOAuthServerBundle 用于这些目的。文档告诉我们以这种方式使用 ClientManager 创建客户端:

$clientManager = $this->getContainer()->get('fos_oauth_server.client_manager.default');
$client = $clientManager->createClient();
$client->setRedirectUris(array('http://www.example.com'));
$client->setAllowedGrantTypes(array('token', 'authorization_code'));
$clientManager->updateClient($client);

但是没有关于将此代码放在哪里的消息。但我已经拥有从 Google 控制台获得的凭据。是否可以使用它们来使用 Google Play Market 帐户登录?如何将它们与自定义身份验证绑定 我应该在哪里使用这些凭据?在 Symfony 3 范围内是否有任何关于此过程的教程?

FOSOAuthServerBundle是服务器。你需要的是一个客户。

您应该尝试使用 HWIOAuthBundle instead or thephpleague/oauth2-client. If none of these libraries fit on your needs, you may find other implementations on Packagist