我想在电子邮件正文中发送一个链接,用户可以点击此链接以使用“使用Google登录”功能。
我正在使用这个简单的链接
$client_id ='xxxxxxxxxxxxxxxxxx';
$client_secret = 'xxxxxxxxxxxxxxxxxx';
$redirect_uri ='xxxxxxxxxxxxxxxxxx';
$google_link='accounts.google.com/o/oauth2/auth?response_type=code&redirect_uri='.$site_url.'&client_id='.$client_id.'&scope=email+profile&access_type=online&approval_prompt=auto';
$html.='<div>
<a href="'.$google_link.'">Click here</a>
</div>
';
wp_mail( $email_address,subject, $html, $headers);
但它给了我这个错误:
The session state () didn't match the state parameter (1843962623)
问题:如何通过电子邮件正文向用户发送此链接(使用Google登录),点击该链接会将用户重定向到我的网站?这个状态参数如何工作?