How to use the angularx-social-login.GoogleLoginProvider.PROVIDER_ID function in angularx-social-login

To help you get started, we’ve selected a few angularx-social-login examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github WISE-Community / WISE / src / main / webapp / site / src / app / register / register-teacher / register-teacher.component.ts View on Github external
public socialSignIn(socialPlatform : string) {
    let socialPlatformProvider;
    if (socialPlatform == "google"){
      socialPlatformProvider = GoogleLoginProvider.PROVIDER_ID;
    }

    this.socialAuthService.signIn(socialPlatformProvider).then(
      (userData) => {
        const googleUserID = userData.id;
        this.teacherService.isGoogleIdExists(googleUserID).subscribe((isExists) => {
          if (isExists) {
            this.router.navigate(['join/teacher/googleUserAlreadyExists']);
          } else {
            this.router.navigate(['join/teacher/form',
              { gID: googleUserID,
                name: userData.name,
                email: userData.email
              }
            ]);
github WISE-Community / WISE / src / main / webapp / site / src / app / register / register-student / register-student.component.ts View on Github external
public socialSignIn(socialPlatform : string) {
    let socialPlatformProvider;
    if (socialPlatform == "google"){
      socialPlatformProvider = GoogleLoginProvider.PROVIDER_ID;
    }

    this.socialAuthService.signIn(socialPlatformProvider).then(
      (userData) => {
        const googleUserID = userData.id;
        this.userService.isGoogleIdExists(googleUserID).subscribe((isExists) => {
          if (isExists) {
            this.router.navigate(['join/googleUserAlreadyExists']);
          } else {
            this.router.navigate(['join/student/form',
              { gID: googleUserID,
                name: userData.name
              }
            ]);

          }
github abacritt / angularx-social-login / demo / src / app / app.module.ts View on Github external
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { FormsModule } from '@angular/forms';
import { HttpModule } from '@angular/http';

import { AppComponent } from './app.component';
import { NavbarComponent } from './navbar/navbar.component';
import { DemoComponent } from './demo/demo.component';

import { SocialLoginModule } from 'angularx-social-login';
import { AuthServiceConfig, GoogleLoginProvider, FacebookLoginProvider, LinkedInLoginProvider  } from 'angularx-social-login';


const config = new AuthServiceConfig([
  {
    id: GoogleLoginProvider.PROVIDER_ID,
    provider: new GoogleLoginProvider('624796833023-clhjgupm0pu6vgga7k5i5bsfp6qp6egh.apps.googleusercontent.com')
  },
  {
    id: FacebookLoginProvider.PROVIDER_ID,
    provider: new FacebookLoginProvider('561602290896109')
  },
  {
    id: LinkedInLoginProvider.PROVIDER_ID,
    provider: new LinkedInLoginProvider('78iqy5cu2e1fgr')
  }
]);

export function provideConfig() {
  return config;
}
github abacritt / angularx-social-login / demo / src / app / demo / demo.component.ts View on Github external
signInWithGoogle(): void {
    this.authService.signIn(GoogleLoginProvider.PROVIDER_ID);
  }
github WISE-Community / WISE / src / main / webapp / site / src / app / app.module.ts View on Github external
configService.getConfig().subscribe((config) => {
    if (config != null) {
      if (configService.getGoogleClientId() != null) {
        autServiceConfig.providers.set(GoogleLoginProvider.PROVIDER_ID,
          new GoogleLoginProvider(configService.getGoogleClientId(), googleLoginOptions));
      }
    }
  });
  return autServiceConfig;

angularx-social-login

Social login and authentication module for Angular 12. Supports authentication with Google, Facebook, Amazon, and VK. Can be extended to other providers also.

MIT
Latest version published 3 years ago

Package Health Score

53 / 100
Full package analysis