You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by George Ludwig <ge...@gmail.com> on 2011/09/30 08:24:45 UTC

conditional page loading on OAuth callback?

My app uses Twitter for authentication via OAuth. When Twitter
redirects the user to my authorization callback page, I would like to
be able to send them to their account setup page if they are a new
user, but if they are an existing user I want to send them to their
status page. I'm able to detect if they were an existing user, but I
don't know how to automatically send them to the appropriate page from
my callback page.

Ideas?

-George

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: conditional page loading on OAuth callback?

Posted by Taha Hafeez <ta...@gmail.com>.
You can use onActivate() method and return the page you want to redirect to

Object onActivate(){
   if(whatever_condition()){
      return SetupPage.class;
   }else {
      return StatusPage.class;
   }
}

On Fri, Sep 30, 2011 at 11:54 AM, George Ludwig <ge...@gmail.com> wrote:
> My app uses Twitter for authentication via OAuth. When Twitter
> redirects the user to my authorization callback page, I would like to
> be able to send them to their account setup page if they are a new
> user, but if they are an existing user I want to send them to their
> status page. I'm able to detect if they were an existing user, but I
> don't know how to automatically send them to the appropriate page from
> my callback page.
>
> Ideas?
>
> -George
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>



-- 
Regards

Taha Hafeez Siddiqi (tawus)
http://tawus.wordpress.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org