DRF-如何为使用Google API登录/注册的用户获取身份验证令牌?

时间:2020-08-06 11:22:04

标签: django django-rest-framework google-login

我有很好的google登录/注册功能-在网站上登录/创建帐户时,用户可以轻松地使用它登录/注册。我正在使用以下软件包:

'allauth',
'allauth.account',
'allauth.socialaccount',
'allauth.socialaccount.providers.google'

我还有另一种问题-我的前端(React Native应用)与'rest_framework.authentication.TokenAuthentication'一起使用。

从前端发出的每个请求都具有以下标头: 'Authorization': 'Token ' + auth_token

问题来了-我应该如何在应用中使用googe auth?有什么方法可以为在google注册的用户创建身份验证令牌(在数据库中)?

0 个答案:

没有答案
相关问题