Skip to content

Instantly share code, notes, and snippets.

View farukEncoded's full-sized avatar

Faruk Abdulla Munshi farukEncoded

View GitHub Profile
@farukEncoded
farukEncoded / README.md
Created November 9, 2022 07:21
How to implement social media authentication in NestJS backend.

Social Media Authentication Using Passport with NestJS BackEnd For which JWT authentication is already implemented.

Steps

Prerequisites

You have already implemented jwt authentication using passport, @nestjs/passport, passport-jwt packages in your projects. So you have those packages preinstalled.

Step 1 - Install necessary packages

Lets Say you want to implement facebook and google authentications. So the packages for facebook authentication would be the followings:

  • passport-facebook and @types/passport-facebook (dev dependency for types).

For google authentication packages to install would be

@farukEncoded
farukEncoded / index.html
Last active November 9, 2022 04:03
Social Media Authentication. Frontend implementation of the NestJS BackEnd.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Social Auth</title>
</head>
<body>
<button id="google">Google Auth</button>
@farukEncoded
farukEncoded / minification.md
Created December 7, 2020 12:04 — forked from gaearon/minification.md
How to Set Up Minification

In production, it is recommended to minify any JavaScript code that is included with your application. Minification can help your website load several times faster, especially as the size of your JavaScript source code grows.

Here's one way to set it up:

  1. Install Node.js
  2. Run npm init -y in your project folder (don't skip this step!)
  3. Run npm install terser

Now, to minify a file called like_button.js, run in the terminal:

@farukEncoded
farukEncoded / gist:dd789be8e5e32b0c6c9933e4e280e3c1
Created June 19, 2020 15:59 — forked from rxaviers/gist:7360908
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue: