From 97bd4359e3a307d4f5a11d1c594348cc592e235c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20FAMIBELLE-PRONZOLA?= Date: Sun, 23 Oct 2022 23:24:43 +0400 Subject: [PATCH] Add Twitter provider to connect --- components/sesyon/koneksyon.js | 24 ++++++++++++++++++++++++ package.json | 2 +- pages/api/auth/[...nextauth].js | 16 +++++++++++++--- 3 files changed, 38 insertions(+), 4 deletions(-) diff --git a/components/sesyon/koneksyon.js b/components/sesyon/koneksyon.js index 47f6f75..6d3a2ef 100644 --- a/components/sesyon/koneksyon.js +++ b/components/sesyon/koneksyon.js @@ -20,15 +20,25 @@ import VisibilityOff from '@mui/icons-material/VisibilityOff' import MuiAlert from '@mui/material/Alert' import LoginIcon from '@mui/icons-material/Login' import AppRegistrationRoundedIcon from '@mui/icons-material/AppRegistrationRounded' +import TwitterIcon from '@mui/icons-material/Twitter' import axios from 'axios' import {validateEmail} from '../../lib/utils/emails' import ResetPassword from '../password/reset-password' import ResetDialog from '../password/reset-dialog' +import LoginProvider from './login-provider' const siteUrl = process.env.NEXT_PUBLIC_SITE_URL || 'http://localhost:3000' const apiUrl = process.env.NEXT_PUBLIC_API_URL || 'http://localhost:1337' +const PROVIDERS = [ + { + id: 'twitter', + title: 'Twitter', + icon: + } +] + function TabPanel(props) { const {children, value, index, ...other} = props @@ -232,6 +242,20 @@ function Koneksyon({chimen}) { } label='S’inscrire' {...a11yProps(1)} /> + + + Se connecter avec + {PROVIDERS.map(({id, title, icon}) => ( + + + + ))} + + + + ou utilisez votre e-mail pour vous identifier + + E-mail