Giter VIP home page Giter VIP logo

linkedin-auth-firebase-functions-node's Introduction

Use LinkedIn Sign In with Firebase and also with nodejs

This sample shows how to authenticate using LinkedIn Sign-In on Firebase. In this sample we use OAuth 2.0 based authentication to get LinkedIn user information then create a Firebase Custom Token (using the LinkedIn user ID).

Setup the sample

Create and setup the Firebase project:

  1. Create a Firebase project using the Firebase Developer Console.
  2. Enable Billing on your Firebase the project by switching to the Blaze plan, this is currently needed to be able to perform HTTP requests to external services from a Cloud Function.

Create and provide a Service Account's credentials:

  1. Create a Service Accounts file as described in the Server SDK setup instructions.
  2. Save the Service Account credential file as ./functions/service-account.json

Create and setup your LinkedIn app:

  1. Create a LinkedIn app in the LinkedIn Developers website.

  2. Add the URL https://<application-id>.firebaseapp.com/popup.html to the OAuth 2.0 > Authorized Redirect URLs of your LinkedIn app.

  3. Copy the Client ID and Client Secret of your LinkedIn app and use them to set the linkedin.client_id and linkedin.client_secret Google Cloud environment variables. For this use:

    firebase functions:config:set linkedin.client_id="yourClientID" linkedin.client_secret="yourClientSecret"

Make sure the LinkedIn Client Secret is always kept secret. For instance do not save this in your version control system.

Deploy your project:

  1. Run firebase use --add and choose your Firebase project. This will configure the Firebase CLI to use the correct project locally.
  2. Run firebase deploy to effectively deploy the sample. The first time the Functions are deployed the process can take several minutes.

Run the sample

step 1.
    ```bash
    npm install
    ```
    ```bash
    yarn
    ```
step 2.
    ```bash
    npm start
    ```
    ```bash
    yarn start
    ```

linkedin-auth-firebase-functions-node's People

Contributors

subhendukundu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

ismaelkedir

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.