Skip to main content

Integrate Google, Facebook, Github & Twitter login in kivy applications

Project description

KivyAuth

Integrate Google, Facebook, Github & Twitter login in kivy applications

build Python 3.6 pypi license format downloads

demo.gif

Installation

It can be installed via pip

pip install kivyauth

How to use

The example below shows the basic usage of the library by integrating google login.

  • Add prerequisite for google login before proceeding further

  • Include necessary imports, for example, in case of google login

from kivyauth.initialize import initialize_google
from kivyauth.logins import login_google, logout, login_providers
  • Initialize google login inside your app's build method
def build(self):
  #..
  self.mGSignInClient= initialize_google(self.success_listener, self.error_listener, RC_SIGN_IN)
  #..

success_listener is a function to be called upon successful login with name, email, and photo url of the user. So, create a success listener function which accepts three parameters and perform after-login stuffs. error_listener doesn't accept any argument. RC_SIGN_IN is just a unique request code used to differentiate among different requests. Define it an integer constant.

  • Next, add below code inside a function to be called when user clicks the login button.
login_google(self.mGSignInClient, RC_SIGN_IN)
self.current_provider= login_providers.google
  • To logout
logout(self.current_provider, self.after_logout)
  • Make sure to include kivyauth as a requirement in the buildozer.spec file
requirements = python3,kivy,kivyauth
  • See demo for refrence

A more comprehensive documentation is on it's way.

Other

Feel free to ping me or raise issues if there's any difficulty in packaging it up.

Star this repo if you think it's useful.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

KivyAuth-1.0.tar.gz (4.8 kB view details)

Uploaded Source

Built Distribution

KivyAuth-1.0-py3-none-any.whl (7.0 kB view details)

Uploaded Python 3

File details

Details for the file KivyAuth-1.0.tar.gz.

File metadata

  • Download URL: KivyAuth-1.0.tar.gz
  • Upload date:
  • Size: 4.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.7.6

File hashes

Hashes for KivyAuth-1.0.tar.gz
Algorithm Hash digest
SHA256 e8d73fd91376fe0dbf3f724da081a093d8af7fe770c89d9894f7a3a66a7b2975
MD5 a30c042e93b296f440d111c7c34578e6
BLAKE2b-256 ea045714da169b13daf99438d87dde866feb7233b5d753ff3bb0a86a6a30cb10

See more details on using hashes here.

Provenance

File details

Details for the file KivyAuth-1.0-py3-none-any.whl.

File metadata

  • Download URL: KivyAuth-1.0-py3-none-any.whl
  • Upload date:
  • Size: 7.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.7.6

File hashes

Hashes for KivyAuth-1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e287c14cb9c8a7f206e18462f3d70958a9b044c7f49e9f73af799911bcd7a778
MD5 1243f29298e7e45c57039525c7ce0ae0
BLAKE2b-256 3c827021ccc6e0b8eef096bb01b83ec0b4e5a73f65b526cf8bcb9658a734ccd7

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page