GeoNode Social Accounts

Allow GeoNode to Login throguh Social Accounts (Facebook and Linkedin)

Base concepts and objects

In order to harmonize the various authentication flows between local accounts and remote social accounts, the whole user registration and authentication codebase has been refactored.

Major changes:

  • geonode-user-accounts has been retired and is not used anymore. This app was only capable of managing local accounts;

  • django-allauth has been integrated as a dependency of geonode. It provides a solution for managing both local and remote user accounts. It is now used for dealing with most user registration and auth flows;

  • django-invitations has also been integrated as a dependency of geonode and is used for managing invitations to new users. This functionality was previously provided by geonode-user-accounts;

  • django-allauth has been extended in order to provide the following additional features:

    • Automatically registering an e-mail with a user when the e-mail is used to connect to a social account;

    • Automatically extract information from the user’s social account and use that to enhance the user’s profile fields on geonode. This was implemented in a pluggable way, allowing custom installs to configure it for other providers;

    • Allow approval of new registrations by staff members before allowing new users to login. This functionality was previously provided by geonode-user-accounts.

  • There are now extra sections on the user’s profile to manage connected social accounts and e-mail accounts

  • When properly configured, the login and register pages now display the possibility to login with social accounts



  • Install the new allauth plugin and remove any of the old dependencies

    pip install -r requirements.txt --upgrade
    pip install -e . --upgrade --no-cache
    pip uninstall geonode-user-accounts -y
    pip uninstall django-user-accounts -y
  • ensure sure the DJango model is updated and the templates updated to the static folder

    DJANGO_SETTINGS_MODULE=geonode.local_settings python -W ignore makemigrations
    DJANGO_SETTINGS_MODULE=geonode.local_settings python -W ignore migrate
    DJANGO_SETTINGS_MODULE=geonode.local_settings python -W ignore collectstatic --noinput
  • ensure that Social Providers are enabled in your settings:

    # prevent signing up by default
    SOCIALACCOUNT_ADAPTER = 'geonode.people.adapters.SocialAccountAdapter'
        'linkedin_oauth2': {
            'SCOPE': [
            'PROFILE_FIELDS': [
        'facebook': {
            'METHOD': 'oauth2',
            'SCOPE': [
            'FIELDS': [
    # Comment out this in case you wont to diable Social login
        "facebook": "geonode.people.profileextractors.FacebookExtractor",
        "linkedin_oauth2": "geonode.people.profileextractors.LinkedInExtractor",


  1. Go to GeoNode/Django Admin Dashboard and add the Social Apps you want to configure:


go to admin section
  • Linkedin

  • Facebook



Make sure to add the sites you want to enable.


You need first to create and configure OAuth2 Applications on your Social Providers.

This will require a persoanl or business account, which can access to the developers sections of LinkedIn and Facebook and create and configure new Applications.

That account won’t be visibile to the GeoNode users. This is needed only to generate OAuth2 Client ID and Client Secret Authorization Keys.

In the following sections we will see in details how to configure them for both LinkedIn and Facebook.

LinkedIn Application


  1. Go to and select Create Application

Linkedin Dev
  1. Create a new Company

  1. Fill the informations


The logo must have precise square dimensions

  1. Select the following Default Application Permissions


Be sure to select the r_basicprofile and r_emailaddress application permissions.

  1. Add OAuth 2.0 Authorized Redirect URLs:
  1. Save

  1. Take note of the Authentication Keys

  1. Go to GeoNode/Django admin, Social Applications and select the LinkedIn one


  1. Cut and Paste the Client ID and Client Secret on the related fields

  1. Save

Facebook Application

(ref.: (ref.:

  1. Go to and Add a New Application

  1. Create the App ID and go to the Dashboard

../../_images/014_socialaouth.png ../../_images/015_socialaouth.png
  1. Take note of the Authentication Keys

  1. Go to GeoNode/Django admin, Social Applications and select the LinkedIn one


  1. Cut and Paste the App ID and Secret Key on the related fields

    ClientID      <--> App Id
    Client Secret <--> Secret Key
  1. Save

  2. Go back to the Facebook Application Dashboard and select Settings

  1. Add your App Domain

  1. Click on Add Platform

  1. Select Web Site

  1. Add the URL

  1. And Save

  1. Go to Add Product

  1. Select Facebook Login

  1. Select Web

  1. Go to Settings

  1. Make sure Allow client OAuth and Access via OAuth Web are enabled

  1. Add the valid redirect URIs:
  1. Save


Login by using Existing Accounts on GeoNode

If you want to enable an already existing user account to login through social apps, you need to associate it to social accounts.

Usually this could be done only by the current user, since this operation requires authentication on its social accounts.

In order to do that you need to go to the User Profile Settings


Click on “Connected social accounts”


And actually connect them

../../_images/034_socialaouth.png ../../_images/035_socialaouth.png