[英]Failed to authenticate on SMTP server with username “***” using 2 possible authenticators
I am using google drive api with laravel for a continuous backup, so I am using following packages我使用谷歌驱动器 api 和 laravel 进行连续备份,所以我使用以下软件包
"nao-pon/flysystem-google-drive": "~1.1", and “nao-pon/flysystem-google-drive”:“~1.1”,和
"spatie/laravel-backup": "^6.14" “spatie/laravel-backup”:“^6.14”
I have set up google drive api v3 with refresh token and put it into.env我已经使用刷新令牌设置了谷歌驱动器 api v3 并将其放入.env
FILESYSTEM_CLOUD=google
GOOGLE_DRIVE_CLIENT_ID=****.apps.googleusercontent.com
GOOGLE_DRIVE_CLIENT_SECRET=****
GOOGLE_DRIVE_REFRESH_TOKEN=****
GOOGLE_DRIVE_FOLDER_ID=****
so everything works properly, and I can use google drive as a disk to store the back up everyday through a cron job, the only problem is after a week the refresh token gets expired(I assume) and stops working with this error message,所以一切正常,我可以使用谷歌驱动器作为磁盘通过cron作业每天存储备份,唯一的问题是一周后刷新令牌过期(我假设)并停止使用此错误消息,
Failed to authenticate on SMTP server with username "****" using 2 possible authenticators. Authenticator LOGIN returned Expected response code 235 but got code "535", with message "535 Incorrect authentication data
if I change the refresh token again from oathplayground and place it into .env
it starts working again for a week.如果我再次从oathplayground更改刷新令牌并将其放入.env
它会再次开始工作一周。
so how can I solve this problem thus I need not to generate the token every week.那么我该如何解决这个问题,因此我不需要每周生成令牌。
Oauth playground is only intended to be used for testing. Oauth Playground 仅用于测试。 Tokens created on the playground will only work for about two weeks.在操场上创建的代币只能使用大约两周。
You should implement your own authorization.您应该实施自己的授权。
It says in the OAuthPlayground that it will revoke authorization tokens after 24 hours.它在 OAuthPlayground 中说它将在 24 小时后撤销授权令牌。
The process of setting up a GCP project, consent screen and authorization is the same for all programming languages.设置 GCP 项目、同意屏幕和授权的过程对于所有编程语言都是相同的。 Have a look at this answer for step by step guide to authorization.查看此答案以获取授权的分步指南。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.