File tree 3 files changed +4
-12
lines changed
3 files changed +4
-12
lines changed Original file line number Diff line number Diff line change 1
1
import SignInButton from '@/components/SignInButton' ;
2
2
import { getFetchUrl } from '@/lib/utils' ;
3
+ import { CommonProviderOptions } from 'next-auth/providers' ;
3
4
4
5
async function LoginPage ( ) {
5
6
const res = await fetch ( `${ getFetchUrl ( ) } /api/auth/providers` ) ;
6
-
7
- if ( ! res . ok ) throw new Error ( `Providers Not Found.` ) ;
8
-
9
- const providers : Provider [ ] = await res . json ( ) ;
7
+ const providers : CommonProviderOptions = await res . json ( ) ;
10
8
11
9
return (
12
10
< div className = "grid grid-cols-2 gap-3 mt-5" >
Original file line number Diff line number Diff line change 1
1
import { getFetchUrl } from '@/lib/utils' ;
2
2
import { Button } from './ui/button' ;
3
3
import { signIn } from '@/lib/auth' ;
4
+ import { CommonProviderOptions } from 'next-auth/providers' ;
4
5
5
- function SignInButton ( { provider } : { provider : Provider } ) {
6
- console . log ( process . env . VERCEL_ENV ) ;
6
+ function SignInButton ( { provider } : { provider : CommonProviderOptions } ) {
7
7
return (
8
8
< form >
9
9
< Button
Original file line number Diff line number Diff line change 1
- interface Provider {
2
- id : string ;
3
- type : string ;
4
- name : string ;
5
- callbackUrl : string ;
6
- }
You can’t perform that action at this time.
0 commit comments