JWT With Apollo

1. install –save jsonwebtoken 2. import {sign} from ‘jsonwebtoken’ 3. login ()=> { const user = await User.findOne(email:email); const valid = await bcrypt.compare(password, user.password) const

JWT

1. install –save jsonwebtoken 2. import {sign} from ‘jsonwebtoken’ 3. login ()=> { const user = await User.findOne(email:email); const valid = await bcrypt.compare(password, user.password) const

OAuth2 – GoogleAPI

Using OAuth 2.0 to Access Google APIs https://developers.google.com/identity/protocols/oauth2 Client libraries The following client libraries integrate with popular frameworks, which makes implementing OAuth 2.0 simpler. More