All Projects → flavors → Django Graphql Social Auth

flavors / Django Graphql Social Auth

Licence: mit
Python Social Auth support for Graphene Django

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Django Graphql Social Auth

Spring Security Pac4j
pac4j security library for Spring Security: OAuth, CAS, SAML, OpenID Connect, LDAP, JWT...
Stars: ✭ 231 (+156.67%)
Mutual labels:  authentication, jwt, twitter, facebook
Play Pac4j
Security library for Play framework 2 in Java and Scala: OAuth, CAS, SAML, OpenID Connect, LDAP, JWT...
Stars: ✭ 375 (+316.67%)
Mutual labels:  authentication, jwt, twitter, facebook
Spring Webmvc Pac4j
Security library for Spring Web MVC: OAuth, CAS, SAML, OpenID Connect, LDAP, JWT...
Stars: ✭ 110 (+22.22%)
Mutual labels:  authentication, jwt, twitter, facebook
Spark Pac4j
Security library for Sparkjava: OAuth, CAS, SAML, OpenID Connect, LDAP, JWT...
Stars: ✭ 154 (+71.11%)
Mutual labels:  authentication, jwt, twitter, facebook
Django Graphql Jwt
JSON Web Token (JWT) authentication for Graphene Django
Stars: ✭ 649 (+621.11%)
Mutual labels:  graphql, django, authentication, jwt
Buji Pac4j
pac4j security library for Shiro: OAuth, CAS, SAML, OpenID Connect, LDAP, JWT...
Stars: ✭ 444 (+393.33%)
Mutual labels:  authentication, jwt, twitter, facebook
Login With
Stateless login-with microservice for OAuth
Stars: ✭ 2,301 (+2456.67%)
Mutual labels:  jwt, twitter, facebook
Hackathon Starter Kit
A Node-Typescript/Express Boilerplate with Authentication(Local, Github, Facebook, Twitter, Google, Dropbox, LinkedIn, Discord, Slack), Authorization, and CRUD functionality + PWA Support!
Stars: ✭ 242 (+168.89%)
Mutual labels:  authentication, twitter, facebook
Django Auth Adfs
A Django authentication backend for Microsoft ADFS and AzureAD
Stars: ✭ 127 (+41.11%)
Mutual labels:  django, authentication, jwt
Express Graphql Boilerplate
Express GraphQL API with JWT Authentication and support for sqlite, mysql, and postgresql
Stars: ✭ 201 (+123.33%)
Mutual labels:  graphql, authentication, jwt
Django Graphql Auth
Django registration and authentication with GraphQL.
Stars: ✭ 200 (+122.22%)
Mutual labels:  graphql, django, authentication
Dj Rest Auth
Authentication for Django Rest Framework
Stars: ✭ 491 (+445.56%)
Mutual labels:  django, authentication, jwt
Ngx Auth Firebaseui
Angular Material UI component for firebase authentication
Stars: ✭ 518 (+475.56%)
Mutual labels:  authentication, twitter, facebook
Nextjs Headless Wordpress
🔥 Nextjs Headless WordPress
Stars: ✭ 110 (+22.22%)
Mutual labels:  graphql, authentication, jwt
Social Network Harvester V1.0
Stars: ✭ 5 (-94.44%)
Mutual labels:  django, twitter, facebook
Hasura Backend Plus
🔑Auth and 📦Storage for Hasura. The quickest way to get Auth and Storage working for your next app based on Hasura.
Stars: ✭ 776 (+762.22%)
Mutual labels:  graphql, authentication, jwt
Keyring
Keyring is an authentication framework for WordPress. It comes with definitions for a variety of HTTP Basic, OAuth1 and OAuth2 web services. Use it as a common foundation for working with other web services from within WordPress code.
Stars: ✭ 52 (-42.22%)
Mutual labels:  authentication, twitter, facebook
Grpc Auth Example
Examples of client authentication with gRPC
Stars: ✭ 65 (-27.78%)
Mutual labels:  authentication, jwt
App
Reusable framework for micro services & command line tools
Stars: ✭ 66 (-26.67%)
Mutual labels:  graphql, jwt
Bash2mp4
Video Downloader for Termux .
Stars: ✭ 68 (-24.44%)
Mutual labels:  twitter, facebook

Django GraphQL Social Auth

|Pypi| |Wheel| |Build Status| |Codecov| |Code Climate|

Python Social Auth_ support for Django GraphQL_

.. _Django GraphQL: https://github.com/graphql-python/graphene-django

Dependencies

  • Python ≥ 3.4
  • Django ≥ 1.11

Installation

Install last stable version from Pypi.

.. code:: sh

pip install django-graphql-social-auth

See the documentation_ for further guidance on setting Python Social Auth.

.. _documentation: http://python-social-auth.readthedocs.io/en/latest/configuration/django.html

Add the SocialAuth mutation to your GraphQL schema.

.. code:: python

import graphene
import graphql_social_auth


class Mutations(graphene.ObjectType):
    social_auth = graphql_social_auth.SocialAuth.Field()

Session_ authentication via accessToken.

.. _Session: https://docs.djangoproject.com/en/2.0/topics/http/sessions/

  • provider: provider name from Authentication backend list_.
  • accessToken: third-party (Google, Facebook...) OAuth token obtained with any OAuth client.

.. _Authentication backend list: https://github.com/flavors/django-graphql-social-auth/wiki/Authentication-backends

.. code:: graphql

mutation SocialAuth($provider: String!, $accessToken: String!) {
  socialAuth(provider: $provider, accessToken: $accessToken) {
    social {
      uid
      extraData
    }
  }
}

JSON Web Token (JWT)

Authentication solution based on JSON Web Token_.

.. _JSON Web Token: https://jwt.io/

Install additional requirements.

.. code:: sh

pip install 'django-graphql-social-auth[jwt]'

Add the SocialAuthJWT mutation to your GraphQL schema.

.. code:: python

import graphene
import graphql_social_auth


class Mutations(graphene.ObjectType):
    social_auth = graphql_social_auth.SocialAuthJWT.Field()

Authenticate via accessToken to obtain a JSON Web Token.

.. code:: graphql

mutation SocialAuth($provider: String!, $accessToken: String!) {
  socialAuth(provider: $provider, accessToken: $accessToken) {
    social {
      uid
    }
    token
  }
}

Relay

Complete support for Relay_.

.. _Relay: https://facebook.github.io/relay/

.. code:: python

import graphene
import graphql_social_auth


class Mutations(graphene.ObjectType):
    social_auth = graphql_social_auth.relay.SocialAuth.Field()

graphql_social_auth.relay.SocialAuthJWT.Field() for JSON Web Token (JWT)_ authentication.

Relay mutations_ only accepts one argument named input:

.. _Relay mutations: https://facebook.github.io/relay/graphql/mutations.htm

.. code:: graphql

mutation SocialAuth($provider: String!, $accessToken: String!) {
  socialAuth(input:{provider: $provider, accessToken: $accessToken}) {
    social {
      uid
    }
  }
}

Customizing

If you want to customize the SocialAuth behavior, you'll need to customize the resolve() method on a subclass of SocialAuthMutation or .relay.SocialAuthMutation.

.. code:: python

import graphene
import graphql_social_auth


class SocialAuth(graphql_social_auth.SocialAuthMutation):
    user = graphene.Field(UserType)

    @classmethod
    def resolve(cls, root, info, social, **kwargs):
        return cls(user=social.user)

Authenticate via accessToken to obtain the user id.

.. code:: graphql

mutation SocialAuth($provider: String!, $accessToken: String!) {
  socialAuth(provider: $provider, accessToken: $accessToken) {
    social {
      uid
    }
    user {
      id
    }
  }
}

Project template

There is a Django project template_ to start a demo project.

.. _Django project template: https://github.com/ice-creams/graphql-social-auth-template


Gracias @omab_ / Python Social Auth_.

.. [email protected]: https://github.com/omab .. _Python Social Auth: http://python-social-auth.readthedocs.io/

.. |Pypi| image:: https://img.shields.io/pypi/v/django-graphql-social-auth.svg :target: https://pypi.python.org/pypi/django-graphql-social-auth

.. |Wheel| image:: https://img.shields.io/pypi/wheel/django-graphql-social-auth.svg :target: https://pypi.python.org/pypi/django-graphql-social-auth

.. |Build Status| image:: https://travis-ci.org/flavors/django-graphql-social-auth.svg?branch=master :target: https://travis-ci.org/flavors/django-graphql-social-auth

.. |Codecov| image:: https://img.shields.io/codecov/c/github/flavors/django-graphql-social-auth.svg :target: https://codecov.io/gh/flavors/django-graphql-social-auth

.. |Code Climate| image:: https://api.codeclimate.com/v1/badges/c579bcfde0fbb7f6334c/maintainability :target: https://codeclimate.com/github/flavors/django-graphql-social-auth

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].