yes.  in the code i posted facebook and google auto-attach to an
existing account because as part of the login credentials those
services provide the user's email address.  for twitter, on
tenthrow.com i added an option in the account profile section to add a
twitter account when you are authenticated (so noone can 'steal' your
account using a twitter account and your email address).  this does
depend on email address being unique in your system.

also, if you are logged in via google, twitter, or facebook and want
to create a tenthrow.com password i allow users to do that from the
account profile pages as well.

i don't think my account profile pages are included in the posted code
though.  if they are useful to people i'll see if i can make them
generic enough to post publicly.

cfh

On Oct 13, 5:46 am, selecta <[email protected]> wrote:
> looks great, seen the slice a while ago and wanted to integrate this
> for some time
>
> I have a question though: Are you able to attach a facbook/twitter/
> normal login... account with an already exising account later on?
>
> On Oct 12, 8:44 pm, howesc <[email protected]> wrote:
>
> > Try this:
>
> >http://web2pyslices.com/main/slices/take_slice/77
>
> > see it in action onwww.tenthrow.com
>
> > cfh
>
> > On Oct 11, 4:57 pm, firedragon852 <[email protected]> wrote:
>
> > > I tried both the following methods:
>
> > > URL: .../login/facebook
> > > if request.args(0) == 'facebook':
> > >         from gluon.contrib.login_methods.oauth20_account import
> > > OAuthAccount
> > >         auth.settings.login_form = FacebookAccount(globals())
>
> > > can get redirected to facebook login page, but when it comes back
> > > web2py insists on going to .../login for authentication.
>
> > > URL: .../facebook_login => same effect
>
> > > On Oct 12, 1:42 am, Francisco Costa <[email protected]> wrote:
>
> > > > anyone?
>
> > > > On Oct 11, 5:18 pm, Francisco Costa <[email protected]> wrote:
>
> > > > > Hello,
> > > > > I'm trying to implement a twitter login using this
>
> > > > > auth.settings.login_form=TwitterTest(globals(),CLIENT_ID,CLIENT_SECRET,
> > > > > AUTH_URL, TOKEN_URL, ACCESS_TOKEN_URL)
>
> > > > > but when you use auth.settings.login_form you lose regular login
>
> > > > > is there a way to have both?
>
>

Reply via email to