允许用户自行注册的最佳方式? [英] Best way to allow users to self-register?

查看:68
本文介绍了允许用户自行注册的最佳方式?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

新HTML LS世界中的一个常见用例是提供用户自行注册,新用户可以注册,接收激活电子邮件,其中包含验证其注册的链接,然后进入登录页面。

A common use case in the new HTML LS world would be to provide user self-registration where a new user may register, receive an activation email with a link to verify their registration and then to proceed to the login page.

由于LS应用程序必须经过身份验证,否则我无法想到这个开箱即用的方法。一些可能的方法可能包括:

As LS applications must be either authenticated or not, there is no way to do this out of the box that I can think of. Some possible ways to do this may include:

1)创建两个应用程序 - 一个经过身份验证(主应用程序),另一个不是(新用户注册应用程序)并共享相同的OData源。然后,您将经过身份验证的应用程序的登录页面上的链接发送到另一个未经过身份验证的应用程序,用户将被指示
以创建新的注册。

1) Create two apps - one authenticated (the main app) and one not (the new user registration app) and share the same OData source. You'd then place a link on the authenticated app's login page to the other non-authenticated app where a user will be directed to create a new registration.

2)创建在同一个经过身份验证的应用程序中的自定义手动编码注册页面,并将该注册页面链接到主要经过身份验证的应用程序的登录页面。

2) Create a custom hand-coded registration page within the same authenticated app and link that registration page to the main authenticated app's login page.

上述两种方法都需要一些自定义编码,可能需要高级编码技能。如果LS在同一个应用程序中支持经过身份验证和未经过身份验证的屏幕/页面(可能是每个屏幕设置),那么更好的方法是什么?甚至
提供开箱即用的用户注册?

Both the above methods will require some custom coding and potentially require advanced coding skills. Might a better approach be if LS supports both authenticated and non-authenticated screens/pages within the same app (maybe a per screen setting)? Or even provide for user registration out of the box?

或者还有其他更好的想法如何实现上述目标?

Or are there any other better ideas on how to achieve the above?

谢谢

Xander

推荐答案

即使您打开了表单身份验证,你应该能够指定一个目录"允许匿名"并将您的注册页面放在那里。例如,HTML客户端位于"客户端/"。所以你应该能够在"服务器/"下面放一个页面。和
将该目录指定为"允许匿名";在web.config中。

Even when you have Forms Authentication turned on, you should be able to specify that a directory "Allows anonymous" and put your registration page there. For example the HTML Client is at "Client/" so you should be able to put a page under "Server/" and specify that directory as "Allows anonymous" in the web.config.

此外,此博客文章的代码允许用户自行注册:

Also, this Blog post has code that will allow for users to self-register:

http://lightswitchhelpwebsite.com /Blog/tabid/61/EntryId/107/Integrating-LightSwitch-Into-An-ASPNET-Application-To-Provide-Single-Sign-On.aspx

但是,除非有人先做,我会做一个博客,显示如何只使用HTML客户端。

However, unless someone does it first, I will do a Blog that shows how to do this using only the HTML client.


这篇关于允许用户自行注册的最佳方式?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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