FLUTTER ECOSYSTEM

Aksoyhlc/github_signin_aksoyhlc

This package is made to make it easier for Flutter developers to add Github login/register to their applications. Official Github OAuth API used.

github_signin_aksoyhlc project cover
Stars
1
Forks
3
Last push (UTC)
Sep 7, 2025
Project status
Active
Ökkeş Aksoy GitHub avatar
GITHUB User

Ökkeş Aksoy ↗

AksoyhlcTurkeyOfficial website ↗
LanguagesDartSwiftHTMLKotlinObjective-C

Packages published by this repository

Dependencies used

Dependency list 5 items

Original README

English project snapshot. Visit GitHub for the latest content.

Expand / collapse project README

Getting Started

Add package dependency

github_signin_aksoyhlc: any  

Example 1

	var params = GithubParamsModel(  
		clientId: 'xxxxxx',  
		clientSecret: 'yyyyyy',  
		callbackUrl: 'http://example.com',  
		scopes: 'read:user,user:email',  
	);  
	  
	GithubSignInResponse result = await GithubSignIn.signIn(context, params: params);

    	if (result.status != ResultStatus.success) {  
		// handle error
		print(result.message);
	} else {
		///TODO: use result  
	}  

Example 2

	var params = GithubParamsModel(  
		clientId: 'xxxxxx',  
		clientSecret: 'yyyyyy',  
		callbackUrl: 'http://example.com',  
		scopes: 'read:user,user:email',  
	);  
	  
	dynamic result = Navigator.push(context, MaterialPageRoute(builder: (context) => GithubSignIn(params: params)));  
	  
	if (result == null) {  
		// user cancelled the sign in or error occurred
	}  
	  
	var data = result as GithubSignInResponse;  
	  
	if (data.status != ResultStatus.success) {  
		print(result.message);
	}  
	  
	///TODO: use response data  
Custom AppBar
	GithubSignIn(
		params: params,
		appBar: PreferredSize(
			child: AppBar(
  				title: Text("Github Sign In"),
			),
			preferredSize: const Size.fromHeight(56),
		)
	)