How to use Google OAuth as autentification for Symfony2 Rest API

余生颓废 提交于 2019-12-25 16:46:10

问题


I am working on SPA and HTML5 Mobile application that's consume my server application via rest api. Server app connects to Google Adwords Api and then sending data to client app. My question is: is it possible to use google oauth login as login for my server api. And how?

Do I need to use FOSOAuthServerBundle?

Best, Antonio


回答1:


This is the flow for this use case: https://developers.google.com/+/web/signin/server-side-flow

And after this you can use google token as your api token, or build your own oauth and use your own token.

Also it is possible to use FOSOAuthServerBundle with custom grant



来源:https://stackoverflow.com/questions/28176629/how-to-use-google-oauth-as-autentification-for-symfony2-rest-api

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!