Skip to content

Library and example project on how to connect to GitHub OAuth (v3) API

Notifications You must be signed in to change notification settings

thiagolocatelli/android-github-oauth

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Android OAuth (v3) Library for Github Applications

GitHub GitHub GitHub

Usage

You can create an utility class where you can define your application credentials, like the one below:

		public class ApplicationData {
			public static final String CLIENT_ID = "";
			public static final String CLIENT_SECRET = "";
			public static final String CALLBACK_URL = "";
		}

To instantiate the main class for the oauth flow, you need to follow the code below:

		GithubApp mApp; = new GithubApp(this,
			ApplicationData.CLIENT_ID,
			ApplicationData.CLIENT_SECRET,
			ApplicationData.CALLBACK_URL);

Once you have the main class ready for the authorization, you can start the authorization flow by calling the following method:

		mApp.authorize();

If you token is expired, you can call this method to refresh it:

		mApp.refreshToken();

To get the account list, call the following method

		mApp.getAccountList();

Contributions

Any contribution to this project is welcome, feel free to fork and create pull requests

Other Android Libraries

Use these libraries also to get the best for your android application

About

Library and example project on how to connect to GitHub OAuth (v3) API

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages