Google APIs python 客户端对 Django 有特殊的支持,在 Google ( https://developers.google.com/api-client-library/python/guide/django ) 给出的示例中,类 oauth2client.django_orm.Storage 是用于存储和检索 Credentials 对象。
但是,我找到了很多示例(https://github.com/jgmize/django-google-drive/tree/master/gdrive/gdoauth2,https://github.com/praekelt/django-google-credentials/tree/ master/google_credentials等)将 Credentials 放入用户个人资料的 CredentialsField 字段中,并将其保存到数据库中。
这两种方法的优点/缺点是什么?有偏好吗?
谢谢。