signInWithGitHub static method
Implementation
static Future<void> signInWithGitHub(BuildContext context) async {
// For web platforms, use Firebase's built-in popup
if (kIsWeb) {
return svc<AuthService>().signInWithPopup(GithubAuthProvider());
}
// For other platforms, use our custom GitHub sign-in implementation
return svc<AuthService>().signIn(await SocialSignIn()
.initialSite(
svc<AuthService>().getSignInConfig<GitHubSignInConfig>()!, null)
.signIn(context)
.then((i) => i.credential));
}