Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Suppose I want members to be able to login with either of two techniques:
Is there some way of logging that member in with that secret key so that all the authorization stuff still functions?
You can use the FormAuthentication class to set an auth cookie like:
FormAuthentication
FormsAuthentication.SetAuthCookie(username);
Or with a persistent cookie:
FormsAuthentication.SetAuthCookie(username, true);
Since this only sets a cookie, you must redirect the user (or simply refresh the page) before the user is actually logged in.
You can then make relevant checks before setting the auth cookie.
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
How to Impersonate Umbraco Member?
Suppose I want members to be able to login with either of two techniques:
Is there some way of logging that member in with that secret key so that all the authorization stuff still functions?
You can use the
FormAuthentication
class to set an auth cookie like:Or with a persistent cookie:
Since this only sets a cookie, you must redirect the user (or simply refresh the page) before the user is actually logged in.
You can then make relevant checks before setting the auth cookie.
is working on a reply...