Full-Stack Web Development with Vue.js and Node

(singke) #1
Building OAuth Strategies with passport.js Chapter 7

In Login.vue, add a link to log in via Twitter with the following:


<template>
<div>
<div class="login">
<a class="btn facebook" href="/login/facebook"> LOGIN WITH
FACEBOOK</a>
<a class="btn twitter" href="/login/twitter"> LOGIN WITH TWITTER</a>
</div>
<v-form v-model="valid" ref="form" lazy-validation>
<v-text-field
label="Email"
v-model="email"
:rules="emailRules"
required
></v-text-field>
...

The preceding code will add a LOGIN WITH TWITTER button. Let's run the following


command:


$ npm run build

Now, if we visit the URL http://localhost:8080/users/login, we should see the


following page:

Free download pdf