Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8204023
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T07:45:42+00:00 2026-06-07T07:45:42+00:00

I use the auth module from webapp2 and I want to know how to

  • 0

I use the auth module from webapp2 and I want to know how to add an auth_id like ‘facebook:fbuserid12121212’ and add that to the list of auth_id:s for a user. But I see no function from the API that allows me to do this. Could you please tell me how to do it?

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T07:45:43+00:00Added an answer on June 7, 2026 at 7:45 am

    This is the answer that the OP found. I’m copying it here so that this question will not be unanswered:

    This was answered in the google group, the function I was looking for is user.auth_ids.append and the code I use now to make use of it is:

    @user_required
    def post(self, **kwargs):
        email = self.request.POST.get('email')
        auser = self.auth.get_user_by_session()
        userid = auser['user_id']
        user = auth_models.User.get_by_id(auser['user_id'])
        existing_user = auth_models.User.get_by_auth_id(email)
    
        if existing_user is not None:
            # You need to handle duplicates. 
            # Maybe you merge the users? Maybe you return an error?
            pass
    
        # Test the uniqueness of the auth_id. We must do this to 
        # be consistent with User.user_create()
        unique = '{0}.auth_id:{1}'.format(auth_models.__class__.__name__, email)
    
        if auth_models.User.unique_model.create(unique):
            # Append email to the auth_ids list
            user.auth_ids.append(email)
            user.put()
            return "Email updated"
        else:
            return 'some error'
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to add user authentication to my restful api that I have created
I enabled the user auth module in Django, however when I use UserCreationForm it
Could anybody brief about user_token functionality in Auth module? What is a use and
I use Tank Auth library on my site and it works great from frontend.
If you want to store extra information about a user (django.contrib.auth.models.User) in Django you
I have a Django web app that I would like to use in a
I have an auth module, and would like to keep a Login form in
I'm writing a Drupal 6 module that sends a user ID + a randomly
I'm trying to make the Auth module to 'remember' the user session with a
I want to modify a few tiny details of Django's built-in django.contrib.auth module. Specifically,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.