Yesod auth: redirecting user to registration page

北慕城南 提交于 2019-12-05 12:36:50

I would recommend splitting the information up into two entities: a User entity that tracks the user's credentials, and a Profile entity containing the registration information. For example:

User
    ident Text
    UniqueUser ident
Profile
    user UserId
    displayName Text
    UniqueProfile user

In getAuthId, you'll either return an existing UserId, or if one doesn't exist, create a new entry. In HomeR, you'll get if there's a Profile (getBy $ UniqueProfile uid), and if not, display the registration form.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!