How to use the angularx-social-login.AuthServiceConfig 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 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 angular / ngcc-validation / projects / angularx-social-login-ngcc / src / app / app.module.ts View on Github external
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';

import { SocialLoginModule, AuthServiceConfig, GoogleLoginProvider } from 'angularx-social-login';
import { AppComponent } from './app.component';

const config = new AuthServiceConfig([]);

@NgModule({
  declarations: [
    AppComponent
  ],
  imports: [
    BrowserModule,
    SocialLoginModule,
  ],
  providers: [{
    provide: AuthServiceConfig, useFactory: () => config,
  }],
  bootstrap: [AppComponent]
})
export class AppModule {
  constructor() {}
github WISE-Community / WISE / src / main / webapp / site / src / app / app.module.ts View on Github external
export function getAuthServiceConfigs(configService: ConfigService) {
  const autServiceConfig: AuthServiceConfig = new AuthServiceConfig([]);
  const googleLoginOptions: LoginOpt = {
    prompt: 'select_account'
  };
  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

51 / 100
Full package analysis