Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

cuppa-angular2-oauth

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cuppa-angular2-oauth

A light weight angular 2 , nodejs, mongo DB social login for facebook, google and linkedin.

  • 2.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
39
decreased by-68.03%
Maintainers
1
Weekly downloads
 
Created
Source

Cuppa Angular2 OAuth

Social Login Script for Facebook, Google, LinkedIn

It is often required that, a user register's or sign up to login to a particular website or application. It is a tedious job to fill those long forms with user basic details. To avoid filling long forms, Cuppa Angular 2 OAuth provides a module to login using social OAuth services like google OAtuh, Facebook OAuth and LinkedIn OAuth. Using this your application will be able to recieve basic details of the user from social networking sites and you can store in your application environment.

www.cuppalabs.com

Architecture

www.cuppalabs.com

Getting Started

To get started using the Cuppa OAuth Social Login, the following pre requisites needs to be met with.

  1. Knowledge of Angular 2 and latest Angular 2 version. Refer Setup AngularJS

  2. Knowledge of NodeJS and latest version installed in your environment. Refer Setup NodeJS

  3. Installed MongoDB and knowledge of setting up. Refer Setup MongoDB

  4. Set up Angular Client, App Server(your node server), Mongo DB.

View the Demo here.

Installation

Follow the steps to install the Cuppa OAuthcode in your environment.

  1. Clone https://github.com/CuppaLabs/angular2-social-login.git repository from github.

  2. $ npm install - To install all the dependencies

  3. $ npm run auth-server - To start the server (Run only when the entire application is setup).

Angular 2 Configuration

Angular Configuration

To configure angular, the urls need to be changed to your environment url endpoints.

  1. Go to src/app/auth.service.ts

  2. Replace the baseURL with your endpoint(http://localhost:500, to run locally), as shown in the below snippet

  3. Create your social app with Google/Facebook/LinkedIn and get you client ID

  4. Replace the Client ID in the authConfig Object as shown below in the snippet.(blurred area)

  5. redirectURI - the redirect url configured in the social networking app which redirects to your page on that URL, on successful login

  6. authEndpoint - Your application server endpoint where it hits for authentication. www.cuppalabs.com

Node Server Configuration

To configure Node Server, follow the below steps

  1. Go to /auth-config.js

  2. Create your social app with Google/Facebook/LinkedIn and get the client secret.

  3. Replace the client secret with your app's client secret as show in the below snippet. (Blurred my credentials). Place your credentials there.

www.cuppalabs.com

Mongo DB Configuration

To configure Node Server with mongo DB details, follow the below steps

  1. Install Mongo DB locally and start or deploy on any cloud platform

  2. Go to /auth-config.js

  3. Replace the username, password, mongo url and DB name. Form the url as follows and replcae as shown in the below snippet. www.cuppalabs.com

Build, Deploy and Run

Ahh !!! Now you are ready to make your app up and running.

  1. Start MongoDB Server

  2. $ npm run build

  3. $ npm run auth-server

  4. Visit http://localhost:5000 to access your app running in your local. This should be the baseURL you configured in the angular configuration section. Deploy to your application server or any cloud platform.

Licence

This project is licensed under the MIT license. See the LICENSE file for more info.

--

The MIT License (MIT) Copyright (c) 2016 Cuppa Labs

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.

Credits

Thanks to Font Awesome the library.

Author

Pradeep Kumar Terli

Keywords

FAQs

Package last updated on 16 Jan 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc