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

How to Use Kotlin in Your Android Projects

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

Reactive Programming with RxBinding

Exploring Android O: Fonts in XML

Exploring Android O: Autosizing TextViews

Introduction to Spring Animation

Introduction to Android Bottom Navigation View

Kotlin: Do more with less code

Getting started with Android Fingerprint Authentication

Picture-in-Picture: Working in Android Oreo