All Projects → jaychang0917 → Socialloginmanager

jaychang0917 / Socialloginmanager

Licence: apache-2.0
DEPRECATED

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Socialloginmanager

Spring Boot React Oauth2 Social Login Demo
Spring Boot React OAuth2 Social Login with Google, Facebook, and Github
Stars: ✭ 676 (+279.78%)
Mutual labels:  social-login, facebook-login, google-login
Argus Android
Login/Registration Module for Android
Stars: ✭ 89 (-50%)
Mutual labels:  social-login, facebook-login, google-login
Angularx Social Login
Social login and authentication module for Angular 9
Stars: ✭ 442 (+148.31%)
Mutual labels:  social-login, facebook-login, google-login
angular5-social-login
Social authentication module for Angular 5. Includes Facebook and Google login with AOT compatibility.
Stars: ✭ 40 (-77.53%)
Mutual labels:  facebook-login, google-login, social-login
Simpleauth
A easy to use social authentication android library. (Facebook, Google, Twitter, Instagram)
Stars: ✭ 216 (+21.35%)
Mutual labels:  social-login, facebook-login, google-login
Rxsocialauth
Android RxJava library for Social auth (Google, Facebook) and Smart Lock For Passwords
Stars: ✭ 50 (-71.91%)
Mutual labels:  rxjava, oauth, facebook-login
Auth
:atom: Social (OAuth1\OAuth2\OpenID\OpenIDConnect) sign with PHP
Stars: ✭ 457 (+156.74%)
Mutual labels:  oauth, facebook-login, google-login
Mern Boilerplate
Fullstack boilerplate with React, Redux, Express, Mongoose, Passport Local, JWT, Facebook and Google OAuth out of the box.
Stars: ✭ 112 (-37.08%)
Mutual labels:  oauth, facebook-login, google-login
social-auth-kivy
Integrate Google, Facebook, Github & Twitter login in kivy applications
Stars: ✭ 133 (-25.28%)
Mutual labels:  facebook-login, google-login, social-login
KASocialLogins
This is Social login library in which you can login through Facebook , LinkedIn and Google
Stars: ✭ 15 (-91.57%)
Mutual labels:  facebook-login, google-login, social-login
Buji Pac4j
pac4j security library for Shiro: OAuth, CAS, SAML, OpenID Connect, LDAP, JWT...
Stars: ✭ 444 (+149.44%)
Mutual labels:  oauth, social-login
Android Smart Login
A smart way to add Login functionality to your Android app.
Stars: ✭ 671 (+276.97%)
Mutual labels:  facebook-login, google-login
Socialite
Socialite is an OAuth2 Authentication tool. It is inspired by laravel/socialite, you can easily use it without Laravel.
Stars: ✭ 1,026 (+476.4%)
Mutual labels:  oauth, social-login
Play Pac4j
Security library for Play framework 2 in Java and Scala: OAuth, CAS, SAML, OpenID Connect, LDAP, JWT...
Stars: ✭ 375 (+110.67%)
Mutual labels:  oauth, social-login
Laravel Oauth
Social OAuth authentication for Laravel 5 & 6. Drivers: Facebook, Twitter, Google, LinkedIn, Github, Bitbucket.
Stars: ✭ 52 (-70.79%)
Mutual labels:  oauth, social-login
Svelte Social Auth
Social Auth for Svelte v3
Stars: ✭ 86 (-51.69%)
Mutual labels:  facebook-login, google-login
Spruce
A social networking platform made using Node.js and MongoDB
Stars: ✭ 399 (+124.16%)
Mutual labels:  oauth, social-login
Spring Webmvc Pac4j
Security library for Spring Web MVC: OAuth, CAS, SAML, OpenID Connect, LDAP, JWT...
Stars: ✭ 110 (-38.2%)
Mutual labels:  oauth, social-login
React Most Wanted
React starter kit with "Most Wanted" application features
Stars: ✭ 1,867 (+948.88%)
Mutual labels:  facebook-login, google-login
Spark Pac4j
Security library for Sparkjava: OAuth, CAS, SAML, OpenID Connect, LDAP, JWT...
Stars: ✭ 154 (-13.48%)
Mutual labels:  oauth, social-login

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.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].