File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed
server/config/oauth/providers Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -54,7 +54,7 @@ export const OAuthLoginButton = ({
5454} ;
5555
5656export const OAuthLoginButtonsGrid = ( ) => {
57- if ( ! OAUTH_PROVIDERS_ENABLED_ARRAY . some ( ( p ) => p . isEnabled ) ) return null ;
57+ if ( ! OAUTH_PROVIDERS_ENABLED_ARRAY . length ) return null ;
5858 return (
5959 < SimpleGrid columns = { 2 } gap = { 3 } >
6060 { OAUTH_PROVIDERS_ENABLED_ARRAY . map ( ( { provider } ) => {
Original file line number Diff line number Diff line change @@ -48,7 +48,12 @@ export const google: OAuthClient = {
4848 message : 'Missing Google environment variables' ,
4949 } ) ;
5050 }
51- if ( ! codeVerifier ) throw new Error ( 'Missing codeVerifier' ) ;
51+ if ( ! codeVerifier ) {
52+ throw new TRPCError ( {
53+ code : 'BAD_REQUEST' ,
54+ message : 'Missing codeVerifier' ,
55+ } ) ;
56+ }
5257 return googleClient . validateAuthorizationCode ( code , codeVerifier ) ;
5358 } ,
5459 getUser : async ( { accessToken, ctx } ) => {
You can’t perform that action at this time.
0 commit comments