Full-Stack Web Development with Vue.js and Node

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

It then takes us to the Create Consent page, where we need to fill in some information


about our application. After that, on the Credentials page, we will be able to view our


Client ID and Client Secret.


These tokens will be used to verify the authentication in our application:


Adding a button to our login page that allows users to log in via Google


The next step is to add a LOGIN WITH GOOGLE button in our login page, which we will


be linking to our Google application that we just created:


<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>
<a class="btn google" href="/login/google"> LOGIN WITH GOOGLE</a>
</div>
<v-form v-model="valid" ref="form" lazy-validation>
<v-text-field
label="Email"
v-model="email"
:rules="emailRules"
required
Free download pdf