All Projects → sabyasachibiswal → angular5-social-login

sabyasachibiswal / angular5-social-login

Licence: other
Social authentication module for Angular 5. Includes Facebook and Google login with AOT compatibility.

Programming Languages

javascript
184084 projects - #8 most used programming language
typescript
32286 projects

Projects that are alternatives of or similar to angular5-social-login

Socialloginmanager
DEPRECATED
Stars: ✭ 178 (+345%)
Mutual labels:  facebook-login, google-login, social-login
Argus Android
Login/Registration Module for Android
Stars: ✭ 89 (+122.5%)
Mutual labels:  facebook-login, google-login, social-login
Spring Boot React Oauth2 Social Login Demo
Spring Boot React OAuth2 Social Login with Google, Facebook, and Github
Stars: ✭ 676 (+1590%)
Mutual labels:  facebook-login, google-login, social-login
Angularx Social Login
Social login and authentication module for Angular 9
Stars: ✭ 442 (+1005%)
Mutual labels:  facebook-login, google-login, social-login
Simpleauth
A easy to use social authentication android library. (Facebook, Google, Twitter, Instagram)
Stars: ✭ 216 (+440%)
Mutual labels:  facebook-login, google-login, social-login
social-auth-kivy
Integrate Google, Facebook, Github & Twitter login in kivy applications
Stars: ✭ 133 (+232.5%)
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 (-62.5%)
Mutual labels:  facebook-login, google-login, social-login
Android Smart Login
A smart way to add Login functionality to your Android app.
Stars: ✭ 671 (+1577.5%)
Mutual labels:  facebook-login, google-login
Svelte Social Auth
Social Auth for Svelte v3
Stars: ✭ 86 (+115%)
Mutual labels:  facebook-login, google-login
socialApp-MERN
Social Networking web app similar to Instagram.
Stars: ✭ 35 (-12.5%)
Mutual labels:  google-login, social-login
Feedfire
FeedFire is a project to help developers integrate with Google Firebase.
Stars: ✭ 100 (+150%)
Mutual labels:  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 (+180%)
Mutual labels:  facebook-login, google-login
React Most Wanted
React starter kit with "Most Wanted" application features
Stars: ✭ 1,867 (+4567.5%)
Mutual labels:  facebook-login, google-login
Auth
:atom: Social (OAuth1\OAuth2\OpenID\OpenIDConnect) sign with PHP
Stars: ✭ 457 (+1042.5%)
Mutual labels:  facebook-login, google-login
Angularaspnetcore2webapiauth
Sample project demonstrating jwt-based authentication with an Angular (v5.2.1) frontend and ASP.NET Core 2 WebApi. Includes both local user registration with .NET Core Identity membership and facebook login scenarios.
Stars: ✭ 435 (+987.5%)
Mutual labels:  facebook-login, angular5
Magento 2 Social Login
Magento 2 Social Login extension is designed for quick login to your Magento 2 store without procesing complex register steps
Stars: ✭ 156 (+290%)
Mutual labels:  facebook-login, social-login
Nest Angular
NestJS, Angular 6, Server Side Rendering (Angular Universal), GraphQL, JWT (JSON Web Tokens) and Facebook/Twitter/Google Authentication, Mongoose, MongoDB, Webpack, TypeScript
Stars: ✭ 307 (+667.5%)
Mutual labels:  facebook-login, google-login
SimpleOAuth
Simple OAuth 2.0 for Android
Stars: ✭ 15 (-62.5%)
Mutual labels:  facebook-login, google-login
Pwa Auth
Web component that lets your users sign-in/sign-up using their Microsoft, Google, Facebook, or Apple account. Your app receives their email address, name, and profile picture.
Stars: ✭ 139 (+247.5%)
Mutual labels:  facebook-login, google-login
Vue-Facebook-Google-oAuth
SignIn or Signup with Facebook and Google using Vue without any external packages
Stars: ✭ 68 (+70%)
Mutual labels:  facebook-login, social-login

Social login api for Angular 5. Includes Facebook and Google login.

AOT Compatible.

Getting started

Install via npm

npm install --save angular5-social-login

Import the module

In app.module.ts,

...

import {
    SocialLoginModule,
    AuthServiceConfig,
    GoogleLoginProvider,
    FacebookLoginProvider,
} from "angular5-social-login";


// Configs 
export function getAuthServiceConfigs() {
  let config = new AuthServiceConfig(
      [
        {
          id: FacebookLoginProvider.PROVIDER_ID,
	      provider: new FacebookLoginProvider("Your-Facebook-app-id")
        },
        {
          id: GoogleLoginProvider.PROVIDER_ID,
	      provider: new GoogleLoginProvider("Your-Google-Client-Id")
        },
      ];
  );
  return config;
}

@NgModule({
  imports: [
    ...
    SocialLoginModule
  ],
  providers: [
    ...
    {
      provide: AuthServiceConfig,
      useFactory: getAuthServiceConfigs
    }
  ],
  bootstrap: [...]
})

export class AppModule { }

Usage :

In signin.component.ts,

import {Component, OnInit} from '@angular/core';
import {
    AuthService,
    FacebookLoginProvider,
    GoogleLoginProvider
} from 'angular5-social-login';

@Component({
  selector: 'app-signin',
  templateUrl: './signin.component.html',
  styleUrls: ['./signin.component.css']
})


export class SigninComponent implements OnInit {

  constructor( private socialAuthService: AuthService ) {}
  
  public socialSignIn(socialPlatform : string) {
    let socialPlatformProvider;
    if(socialPlatform == "facebook"){
      socialPlatformProvider = FacebookLoginProvider.PROVIDER_ID;
    }else if(socialPlatform == "google"){
      socialPlatformProvider = GoogleLoginProvider.PROVIDER_ID;
    }
    
    this.socialAuthService.signIn(socialPlatformProvider).then(
      (userData) => {
        console.log(socialPlatform+" sign in data : " , userData);
        // Now sign-in with userData
        ...
            
      }
    );
  }
  
}

In signin.component.html,

<h1>
     Sign in
</h1>

<button (click)="socialSignIn('facebook')">Sign in with Facebook</button>
<button (click)="socialSignIn('google')">Signin in with Google</button>              

Facebook App Id :

You need to create your own app by going to Facebook Developers page. Add Facebook login under products and configure Valid OAuth redirect URIs.

Google Client Id :

Follow this official documentation on how to Create a Google API Console project and client ID.

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].