1

I try to implement Sign in with Facebook to my app (next.js), which require me to put tag to my html file, but with next.js is not static page, so I don't have html file. This says I should create /public/static/script.js and put my code something like this:

import Head from 'next/head';
import MyAwesomeComponent from '../components/mycomponent';

export default () => (
  <div>
    <Head>
      <script type="text/javascript" src="/static/script.js"></script>
    </Head>
    <MyAwesomeComponent />
  </div>
)

Is that the way to do it is it a good practice, or I'm doing it wrong

Suphawat
  • 61
  • 7
  • 1
    Have you tried to use [next-auth](https://next-auth.js.org/) ? – Frederic Perron Oct 22 '22 at 12:04
  • where in the docs does it say to put a script tag in order to implement facebook login? https://firebase.google.com/docs/auth/web/facebook-login#handle_the_sign-in_flow_with_the_firebase_sdk – mocherfaoui Oct 22 '22 at 14:41

0 Answers0