File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ import EmailIcon from '../icons/EmailIcon';
1414import PasswordIcon from '../icons/PasswordIcon' ;
1515import Image from 'next/image' ;
1616import Google from '../../public/Google__G__Logo.svg.png' ;
17- import Twitter from '../../public/twitter2 .png' ;
17+ import Github from '../../public/github .png' ;
1818
1919export default function Login ( {
2020 setServerError,
@@ -55,6 +55,16 @@ export default function Login({
5555 const { data, error } = await supabase . auth . signInWithOAuth ( {
5656 provider : 'google' ,
5757 } ) ;
58+ if ( error ) console . log ( error ) ;
59+ }
60+
61+ async function signInWithGitHub ( ) {
62+ const { data, error } = await supabase . auth . signInWithOAuth ( {
63+ provider : 'github' ,
64+ options : {
65+ scopes : 'user' ,
66+ } ,
67+ } ) ;
5868 }
5969 return (
6070 < form className = "flex flex-col" onSubmit = { handleSubmit ( onSubmit ) } >
@@ -141,7 +151,7 @@ export default function Login({
141151 active:shadow-sm
142152 active:bg-frost-800
143153 font-bold
144- py-2
154+ py-2
145155 w-9
146156 rounded-2xl
147157 tracking-widest
@@ -177,8 +187,14 @@ export default function Login({
177187 flex justify-center
178188 hover:cursor-pointer
179189 ` }
190+ onClick = { ( ) => signInWithGitHub ( ) }
180191 >
181- < Image className = "w-6 " src = { Twitter } alt = "Twitter" priority />
192+ < Image
193+ className = "w-6 rounded-3xl"
194+ src = { Github }
195+ alt = "Github"
196+ priority
197+ />
182198 </ div >
183199 </ div >
184200 </ div >
You can’t perform that action at this time.
0 commit comments