All Projects → adrielcafe → Androidoauth

adrielcafe / Androidoauth

A simple way to authenticate with Google and Facebook using OAuth 2.0 in Android

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Androidoauth

Play Authenticate
An authentication plugin for Play Framework 2.x (Java)
Stars: ✭ 813 (+823.86%)
Mutual labels:  google, oauth, facebook
Nemiro.oauth.dll
Nemiro.OAuth is a class library for authorization via OAuth protocol in .NET Framework
Stars: ✭ 45 (-48.86%)
Mutual labels:  google, oauth, facebook
Simplicity
A simple way to implement Facebook and Google login in your iOS apps.
Stars: ✭ 683 (+676.14%)
Mutual labels:  google, oauth, facebook
Assent
Multi-provider framework in Elixir
Stars: ✭ 126 (+43.18%)
Mutual labels:  google, oauth, facebook
Pow assent
Multi-provider authentication for your Pow enabled app
Stars: ✭ 236 (+168.18%)
Mutual labels:  google, oauth, facebook
Core Nestjs
A simple application demonstrating the basic usage of permissions with NestJS (JWT, Passport, Facebook, Google+, User, Group, Permission)
Stars: ✭ 347 (+294.32%)
Mutual labels:  google, oauth, facebook
Socialite
Socialite is an OAuth2 Authentication tool. It is inspired by laravel/socialite, you can easily use it without Laravel.
Stars: ✭ 1,026 (+1065.91%)
Mutual labels:  google, oauth, facebook
Turnstile
An authentication framework for Swift.
Stars: ✭ 163 (+85.23%)
Mutual labels:  google, oauth, facebook
Login With
Stateless login-with microservice for OAuth
Stars: ✭ 2,301 (+2514.77%)
Mutual labels:  google, oauth, facebook
Oauth
🔗 OAuth 2.0 implementation for various providers in one place.
Stars: ✭ 336 (+281.82%)
Mutual labels:  google, oauth, facebook
Yii2 Authclient
Yii 2 authclient extension.
Stars: ✭ 430 (+388.64%)
Mutual labels:  google, oauth, facebook
Djangae
The best way to run Django on Google Cloud. This project is now on GitLab: https://gitlab.com/potato-oss/djangae/djangae
Stars: ✭ 576 (+554.55%)
Mutual labels:  google, library
Ocbarrage
iOS 弹幕库 OCBarrage, 同时渲染5000条弹幕也不卡, 轻量, 可拓展, 高度自定义动画, 超高性能, 简单易上手; A barrage render-engine with high performance for iOS. At the same time, rendering 5000 barrages is also very smooth, lightweight, scalable, highly custom animation, ultra high performance, simple and easy to use!
Stars: ✭ 589 (+569.32%)
Mutual labels:  google, facebook
Leku
🌍 Map location picker component for Android. Based on Google Maps. An alternative to Google Place Picker.
Stars: ✭ 612 (+595.45%)
Mutual labels:  google, library
Sns auth
通用第三方登录SDK,支持微信,微信扫码,QQ,微博登录,支付宝登录,Facebook,Line,Twitter,Google
Stars: ✭ 520 (+490.91%)
Mutual labels:  google, facebook
React Login Modal Sm
Customizable React Social Media login modal
Stars: ✭ 23 (-73.86%)
Mutual labels:  google, facebook
Ngx Auth Firebaseui
Angular Material UI component for firebase authentication
Stars: ✭ 518 (+488.64%)
Mutual labels:  google, facebook
Nativescript Plugin Firebase
🔥 NativeScript plugin for Firebase
Stars: ✭ 990 (+1025%)
Mutual labels:  google, facebook
Shellphish
Phishing Tool for 18 social media: Instagram, Facebook, Snapchat, Github, Twitter, Yahoo, Protonmail, Spotify, Netflix, Linkedin, Wordpress, Origin, Steam, Microsoft, InstaFollowers, Gitlab, Pinterest
Stars: ✭ 1,037 (+1078.41%)
Mutual labels:  google, facebook
Netcore Postgres Oauth Boiler
A basic .NET Core website boilerplate using PostgreSQL for storage, Adminer for db management, Let's Encrypt for SSL certificates and NGINX for routing.
Stars: ✭ 57 (-35.23%)
Mutual labels:  google, oauth

Android Arsenal Release

AndroidOAuth

A simple way to authenticate with Google and Facebook using OAuth 2.0 in Android

How To Use

Google

Google Consent Google Auth

Login

// Use a Web credential instead of Android credential
GoogleOAuth.login(this)
    .setClientId(Credentials.GOOGLE_CLIENT_ID)
    .setClientSecret(Credentials.GOOGLE_CLIENT_SECRET)
    .setAdditionalScopes("https://www.googleapis.com/auth/plus.login https://www.googleapis.com/auth/user.birthday.read")
    .setRedirectUri(Credentials.GOOGLE_REDIRECT_URI)
    .setCallback(new OnLoginCallback() {
        @Override
        public void onSuccess(String token, SocialUser user) {
            Log.d("Google Token", token);
            Log.d("Google User", user+"");
        }
        @Override
        public void onError(Exception error) {
            error.printStackTrace();
        }
    })
    .init();

Logout (revoke token)

GoogleOAuth.logout(this)
    .setToken(currentToken)
    .setCallback(new OnLogoutCallback() {
        @Override
        public void onSuccess() {
            
        }
        @Override
        public void onError(Exception error) {
            
        }
    })
    .init();

Facebook

Facebook Consent Facebook Auth

Login

// No need to configure Android section on Facebook app
FacebookOAuth.login(this)
    .setClientId(Credentials.FACEBOOK_APP_ID)
    .setClientSecret(Credentials.FACEBOOK_APP_SECRET)
    .setAdditionalScopes("user_friends user_birthday")
    .setRedirectUri(Credentials.FACEBOOK_REDIRECT_URI)
    .setCallback(new OnLoginCallback() {
        @Override
        public void onSuccess(String token, SocialUser user) {
            Log.d("Facebook Token", token);
            Log.d("Facebook User", user+"");
        }
        @Override
        public void onError(Exception error) {
            error.printStackTrace();
        }
    })
    .init();

Logout (revoke token)

FacebookOAuth.logout(this)
    .setToken(currentToken)
    .setCallback(new OnLogoutCallback() {
        @Override
        public void onSuccess() {
            
        }
        @Override
        public void onError(Exception error) {
            
        }
    })
    .init();

Import to your project

Put this into your app/build.gradle:

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

dependencies {
  compile 'com.github.adrielcafe:AndroidOAuth:1.1.5'
}

TODO

  • [ ] Twitter support
  • [X] Get name, email, profileUrl, coverUrl and birthday from authenticated user
  • [X] logout() method to revoke token
  • [X] setAdditionalScopes() method to add more scopes from Google and Facebook

Dependencies

License

The MIT License (MIT)

Copyright (c) 2016 Adriel Café

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
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].