[英]Safari and Laravel - Mail Verification
Background Story背景故事
I've been developing a Laravel application for about a month now.我已经开发 Laravel 应用程序大约一个月了。 During the development I've only used google chrome for testing the application.
在开发过程中,我只使用 google chrome 来测试应用程序。 The project makes use of Laravels mustverify to verify the users email.
该项目使用 Laravel mustverify 来验证用户 email。 This works flawless in google chrome, however, when I switched to my MacBook, using safari, things got ugly.
这在谷歌浏览器中完美无缺,但是,当我使用 safari 切换到我的 MacBook 时,事情变得丑陋了。
The Problem问题
When I get the mail from the application to my mail-client, I usually just click the link "Verify Email Address" shown below.当我从应用程序收到邮件到我的邮件客户端时,我通常只需单击下面显示的链接“验证 Email 地址”。 However, this just does not work in Safari.
但是,这在 Safari 中不起作用。 Normally I get sent to the user-panel as a verified user (in google chrome), but in Safari, I get redirected to the login-page (not verified or "logged in"), as of if the session does not exist in the safari browser.
通常,我作为经过验证的用户(在谷歌浏览器中)被发送到用户面板,但在 Safari 中,我被重定向到登录页面(未验证或“登录”),就像 session 不存在一样safari 浏览器。
So what have I tried?那么我尝试了什么?
I also read this post that says that Safari requires a "www."我还阅读了这篇文章,上面说 Safari 需要“www”。 in front of the url to make it understand.
前面的url让大家明白。 But how would I achieve this in a localhost?
但是我将如何在本地主机中实现这一点?
So now I'm reaching out to you for tips, thoughts or ideas.所以现在我正在与您联系以获取提示、想法或想法。 I will list some information below that might be relevant:
我将在下面列出一些可能相关的信息:
The error was that Safari did not trust the links that mailtrap provided me with.错误是 Safari 不信任 mailtrap 提供给我的链接。 When switching to a normal mail client, everything works fine.
切换到普通邮件客户端时,一切正常。
Edit your session.same_site
config to use none
or null
编辑您的
session.same_site
配置以使用none
或null
don't forget to use lax
or strict
in production不要忘记在生产中使用
lax
或strict
probably a Safari Bug... but this is how I fixed it...可能是 Safari 错误...但这就是我修复它的方式...
I've provided an answer here also...我在这里也提供了答案...
https://laracasts.com/discuss/channels/laravel/laravel-8-email-verification-not-working-with-different-browsers https://laracasts.com/discuss/channels/laravel/laravel-8-email-verification-not-working-with-different-browsers
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.