Custom login using public access Options
jason
Posted: Friday, November 17, 2006 4:22:29 AM
Rank: Aficionado

Joined: 7/19/2006
Posts: 179
Location: Pittsburgh, Pennsylvania, USA
Is it possible to use the Public Access option on content to force a login to a custom page instead of using the member controls macro or having the member controls installed?

I have the Public Access set on a page and when calling the page, it redirects to the login page I selected when setting Public Access. And I successfully login a user and add them to cache. However, I'm kind of stuck after that....how am I able to know which page was orginally called so I can forward a successful login to the page they were trying to access?

Any thoughts or ideas would be appreciated.

Jason
jason
Posted: Friday, November 17, 2006 1:36:55 PM
Rank: Aficionado

Joined: 7/19/2006
Posts: 179
Location: Pittsburgh, Pennsylvania, USA
I downloaded the member controls and installed the package. When a page is protected, shouldn't the user be redirect to login page and after successfully logging in be forwarded to the originally requested page? The member login will login/logout but doesn't move the user to the protected page.

What am I missing?

Thanks.

Jason
jason
Posted: Friday, November 17, 2006 5:24:32 PM
Rank: Aficionado

Joined: 7/19/2006
Posts: 179
Location: Pittsburgh, Pennsylvania, USA
Well, now I can get my login form to redirect the logged in (also added to umbraco cache) user to the requested page. HOWEVER, that page just bounces the user back to the login page:cry:

Once a user is logged in, why would they get redirected to the login page???

Thanks

Jason
jason
Posted: Saturday, November 18, 2006 3:13:36 PM
Rank: Aficionado

Joined: 7/19/2006
Posts: 179
Location: Pittsburgh, Pennsylvania, USA
I watcheded Neils screencast for using the member controls....no forwarding is built in. Everything seems to work in that the login form is displayed and it logs a user in. It will also log out. But I still cannot access the protected page after login.



Any thoughts or suggesting are greatly appreciated. Our first umbraco site didn't use the member controls but we need it for our second and third sites. This is killing my project!



Jason
jason
Posted: Sunday, November 19, 2006 1:29:56 AM
Rank: Aficionado

Joined: 7/19/2006
Posts: 179
Location: Pittsburgh, Pennsylvania, USA
Figured it out. We've done some mods to the umbraco code and I had an old dll in the mix.




Jason
yonkz
Posted: Wednesday, January 17, 2007 8:45:05 PM
Rank: Newbie

Joined: 1/17/2007
Posts: 2
So, how did you capture the referer in your code? I'm creating a custom login form that logs users in based on their windows account, but cannot seem to figure out which page they are coming from.
jason
Posted: Monday, January 22, 2007 1:43:05 PM
Rank: Aficionado

Joined: 7/19/2006
Posts: 179
Location: Pittsburgh, Pennsylvania, USA
Umbraco handles pushing the user to the login page when a protected page is accessed. When the user is successfully logged in, umbraco will forward them to the originally requested page. On your login page, add the member to cache and umbraco will know they are logged in....use the umbraco method AddMemberToCache().

Does this help?



Jason
Users browsing this topic
Guest


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.