Git Product home page Git Product logo

vue-node-passport's Introduction

vue-node-passport

Description

This is a small example of using an openID provider to add authentication to your applications. I had a ton of trouble understanding the Passport workflow so hopefully this helps.

Try it out here!

It's using Passport, and it's implemented on the frontend using Vue.js, but any framework would work - accessing a single api point is all that needs to be done to check user logged-in status and retrieve data.

Setup

  1. Start with the obvious:
npm install
  1. Rename server/settings.js.example to server/settings.js and fill in all of your information for Mongo, Twitch, etc.

Running the Server

For this project, you'll be running two servers: a Node server for the backend, and vue-cli-service for hot-reloading and building your app. Run each of the following commands in two different terminals:

node server.js
npm run serve

The example app is now up and running. You should be able to login with your Twitch account.

What if I want to login with [a different service]?

You'll need to change the Passport strategy. Just about every service already has a passport strategy available. You'll need to update server.js but that's about it.

I have more questions!

I'd love to help - UPDATE: I don't have social media anymore, so just leave an issue here on Github.

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.