Chris Lewis <burningodzi...@gmail.com> writes:

> Hi list,
>
> I'm working on an appengine app, and need to store some user 
> information. I authenticate the user with their google account, and I 
> need to create their "local" entity only if it's their first time 
> logging in.
>
> When a user logs in via google, they are redirected back to your app, to 
> a URL of your choosing. My thought was to catch the request as it comes 
> back and, if it's their first time logging in, create a User entity. My 
> question then is how can I do this without:
>
> a) Using a snippet, called from the return landing page and emitting 
> NodeSeq.Empty - hack.
>
> b) Using custom dispatch and then redirecting. That may work, but it's 
> an unneeded round trip.
>
> Any thoughts? Thanks!

Not sure if the landing page is static, has parameters etc and what you
want to do afterwards. 

Assume you need to render some template and the landing page is not
static (if it is you could just use a normal Loc) I would probably wrap
the landing page in a RewriteRequest, and when a match is made, do the
user creation/lookup thing and then just render the template.

Tim wrote and article about rewriting
http://blog.getintheloop.eu/2009/5/3/url-rewriting-with-the-lift-framework

Also, I've been using the Locs from CRUDify as an example of how to do
more custom-type Locs with rewriting.....

/Jeppe

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to