Github OAuth Client Library - Android



The Github_OAuth library helps to easily add a Github's OAuth implementation flow to your Android application.

It will open a new Dialog Fragment with webview and user token will be returned on callback.

Find more about GitHub's OAuth implementation

Let’s go through a sample application that authenticate using Github. complete source code of this library and sample application is available on Github.

Setup

Using Gradle

The Github-OAuth library is pushed to jcenter, so you need to add the following dependency to your app's build.gradle.

As a module

If you can't include it as gradle dependency, you can also download this GitHub repo and copy the library folder to your project.

Usage

Obtaining GithubAuthenticator instance

Obtaining an access token via the GithubAuthenticator

Authenticate will open a new Dialog Fragment with webview and user token will be returned on callback

Enable logs

Scope can also be defined (optional)

Available scopes are from developer page

Comments

Popular posts from this blog

Android Debug Database: A Library for Debugging Android Databases and Shared Preferences

How to Use Kotlin in Your Android Projects

Reactive Programming with RxBinding

Getting started with Android Fingerprint Authentication

Introduction to Spring Animation

Exploring Android O: Autosizing TextViews

Exploring Android O: Fonts in XML

Kotlin: Do more with less code

Introduction to Android Bottom Navigation View

Picture-in-Picture: Working in Android Oreo