Login Facebook in Next.js Typescript

How to login and logout Facebook in next.js in typescript style