Socialloginmanager

Alternatives To Socialloginmanager
Project NameStarsDownloadsRepos Using ThisPackages Using ThisMost Recent CommitTotal ReleasesLatest ReleaseOpen IssuesLicenseLanguage
Supertokens Core10,125
a day ago100otherJava
Open source alternative to Auth0 / Firebase Auth / AWS Cognito
Django Allauth8,3195,1601262 days ago70March 31, 202398mitPython
Integrated set of Django applications addressing authentication, registration, account management as well as 3rd party (social) account authentication.
Zitadel4,706
13 hours ago947December 20, 2022432apache-2.0Go
ZITADEL - Identity infrastructure, simplified for you.
Flask Appbuilder4,322301328 days ago302July 27, 2023159bsd-3-clausePython
Simple and rapid application development framework, built on top of Flask. includes detailed security, auto CRUD generation for your models, google charts and much more. Demo (login with guest/welcome) - http://flaskappbuilder.pythonanywhere.com/
Alfred Github Workflow2,806
6 months ago9mitPHP
GitHub Workflow for Alfred 4
Vouch Proxy2,391
a month ago160January 21, 202359mitGo
an SSO and OAuth / OIDC login solution for Nginx using the auth_request module
Login With2,29322 years ago9August 08, 201835mitJavaScript
Stateless login-with microservice for OAuth
Hanko2,282510 hours ago24August 02, 202357otherTypeScript
Open authentication and user management for the passkey era
Loginsrv1,750
23 years ago7February 11, 202127mitGo
JWT login microservice with plugable backends such as OAuth2, Google, Github, htpasswd, osiam, ..
Gologin1,635764 days ago16January 07, 2023mitGo
Go login handlers for authentication providers (OAuth1, OAuth2)
Alternatives To Socialloginmanager
Select To Compare


Alternative Project Comparisons
Readme

PLEASE NOTE, THIS PROJECT IS NO LONGER BEING MAINTAINED

Please check out SimpleAuth

SocialLoginManager

Release

This library aims to eliminate boilerplate code for social login.

Setup

To use this library your minSdkVersion must be >= 15.

In your project level build.gradle :

allprojects {
    repositories {
        ...
        maven { url "https://jitpack.io" }
    }
}

In your app level build.gradle :

dependencies {
    compile 'com.github.jaychang0917:SocialLoginManager:{latest_version}'
}

Release

Usage

Step 0

You must setup your Manifest.xml for facebook / google login to use this libary.

For example:

Facebook login

<application
    ...
    <meta-data
        android:name="com.facebook.sdk.ApplicationId"
        android:value="@string/facebook_app_id" />

    <activity
        android:name="com.facebook.FacebookActivity"
        android:configChanges=
            "keyboard|keyboardHidden|screenLayout|screenSize|orientation"
        android:label="@string/app_name"
        android:theme="@android:style/Theme.Translucent.NoTitleBar"
        tools:replace="android:theme" />

    <activity
        android:name="com.facebook.CustomTabActivity"
        android:exported="true">
        <intent-filter>
            <action android:name="android.intent.action.VIEW" />

            <category android:name="android.intent.category.DEFAULT" />
            <category android:name="android.intent.category.BROWSABLE" />

            <data android:scheme="@string/fb_login_protocol_scheme" />
        </intent-filter>
    </activity>
</application>

Google Login

  • Put your google-services.json under app directory.
  • Add classpath 'com.google.gms:google-services:3.0.0' in your project level build.gralde.
  • Add apply plugin: 'com.google.gms.google-services' in your app level build.gralde

Step 1

public class App extends MultiDexApplication {

  @Override
  public void onCreate() {
    super.onCreate();
    SocialLoginManager.init(this);
  }
}

Step 2

public class MainActivity extends AppCompatActivity {

  private static final String TAG = MainActivity.class.getSimpleName();

  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);

    Button fbLoginButton = (Button) findViewById(R.id.fbLoginButton);
    fbLoginButton.setOnClickListener(view -> {
      loginByFacebook();
    });

    Button googleLoginButton = (Button) findViewById(R.id.googleLoginButton);
    googleLoginButton.setOnClickListener(view -> {
       loginByGoogle();
    });

  }

  private void loginByFacebook() {
    SocialLoginManager.getInstance(this)
      .facebook()
      .login()
      .subscribe(socialUser -> {
          Log.d(TAG, "userId: " + socialUser.userId);
          Log.d(TAG, "photoUrl: " + socialUser.photoUrl);
          Log.d(TAG, "accessToken: " + socialUser.accessToken);
          Log.d(TAG, "name: " + socialUser.profile.name);
          Log.d(TAG, "email: " + socialUser.profile.email);
          Log.d(TAG, "pageLink: " + socialUser.profile.pageLink);
        },
        error -> {
          Log.d(TAG, "error: " + error.getMessage());
        });
  }

  private void loginByGoogle() {
    SocialLoginManager.getInstance(this)
      .google(getString(R.string.default_web_client_id))
      .login()
      .subscribe(socialUser -> {
          Log.d(TAG, "userId: " + socialUser.userId);
          Log.d(TAG, "photoUrl: " + socialUser.photoUrl);
          Log.d(TAG, "accessToken: " + socialUser.accessToken);
          Log.d(TAG, "email: " + socialUser.profile.email);
          Log.d(TAG, "name: " + socialUser.profile.name);
        },
        error -> {
          Log.d(TAG, "error: " + error.getMessage());
        });
  }
  
  private void loginByInstagram() {
    SocialLoginManager.getInstance(this)
      .instagram("client_id", "client_secret", "redirect_url")
      .login()
      .subscribe(socialUser -> {
        Log.d(TAG, "userId: " + socialUser.userId);
        Log.d(TAG, "photoUrl: " + socialUser.photoUrl);
        Log.d(TAG, "accessToken: " + socialUser.accessToken);
        Log.d(TAG, "name: " + socialUser.profile.name);
        Log.d(TAG, "fullName: " + socialUser.profile.fullName);
      }, error -> {
        Log.d(TAG, "error: " + error.getMessage());
      });
  }

}

Change Log

Change Log

License

Copyright 2016 Jay Chang

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Popular Oauth Projects
Popular Login Projects
Popular Security Categories
Related Searches

Get A Weekly Email With Trending Projects For These Categories
No Spam. Unsubscribe easily at any time.
Java
Oauth
Login
Rxjava
Social Login
Facebook Login
Google Login