从角度到后端的社交登录laminas api工具

问题描述

有人能指出我正确的方向吗?

我正在尝试将google登录信息集成到我的angular项目中。我的后端在laminas API tool framework中。

这个角度模块看起来很不错。 https://www.npmjs.com/package/angularx-social-login

如该角度模块中所述,You can communicate the auth_token to your server to authenticate the user in server and make API calls from server.

我正在尝试找到实现这一目标的最佳方法如何在后端使用auth_token

我应该从后端用那个auth_token重新调用google来检查用户是否已被授权吗?对我来说,这看起来不对劲,因为要登录用户,我将必须对Google进行2次API调用(从angular和backend)。

解决方法

我最终回忆起谷歌也验证了来自 API 的 auth_token。任何人知道更好的答案,请在此处添加,将接受。