将authRoute直接指向谷歌身份验证 [英] Point authRoute directly to google auth

查看:213
本文介绍了将authRoute直接指向谷歌身份验证的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


$ b $因为我只是使用google auth,所以我想摆脱登录屏幕,因为只有一个google按钮就是多余的。 b

设置 authRoute 直接指向google auth而不是指向 Just $ AuthR的方式(如果可能) LoginR ?它看起来不是很简单,因为它涉及到一些POST请求,但是我希望我在这里丢失了一些明显的东西。 解决方案

你想重定向到 forwardUrl for Google Email:

  Just $ AuthR Yesod.Auth.GoogleEmail.forwardUrl 
code>


Since I'm only using google auth anyways, I would like to get rid of the login screen seeing as it's quite superfluous to have a page with just a google button on.

What would be the way (if possible) to set the authRoute to point directly to google auth instead of pointing to the Just $ AuthR LoginR? It didn't seem super simple since it involved some POST request, but I'm hoping I'm missing something obvious here.

解决方案

You want to redirect to the forwardUrl for Google Email:

Just $ AuthR Yesod.Auth.GoogleEmail.forwardUrl

这篇关于将authRoute直接指向谷歌身份验证的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆