File tree Expand file tree Collapse file tree 2 files changed +10
-4
lines changed
backend/src/services/auth/providers
frontend/src/components/auth Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -60,7 +60,7 @@ export class OauthProvider implements ProvidersInterface {
60
60
}
61
61
62
62
async getToken ( code : string ) : Promise < string > {
63
- const response = await fetch ( `${ this . tokenUrl } / ` , {
63
+ const response = await fetch ( `${ this . tokenUrl } ` , {
64
64
method : 'POST' ,
65
65
headers : {
66
66
'Content-Type' : 'application/x-www-form-urlencoded' ,
@@ -85,7 +85,7 @@ export class OauthProvider implements ProvidersInterface {
85
85
}
86
86
87
87
async getUser ( access_token : string ) : Promise < { email : string ; id : string } > {
88
- const response = await fetch ( `${ this . userInfoUrl } / ` , {
88
+ const response = await fetch ( `${ this . userInfoUrl } ` , {
89
89
headers : {
90
90
Authorization : `Bearer ${ access_token } ` ,
91
91
Accept : 'application/json' ,
Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ import { LoadingComponent } from '@gitroom/frontend/components/layout/loading';
14
14
import interClass from '@gitroom/react/helpers/inter.font' ;
15
15
import clsx from 'clsx' ;
16
16
import { GoogleProvider } from '@gitroom/frontend/components/auth/providers/google.provider' ;
17
+ import { OauthProvider } from '@gitroom/frontend/components/auth/providers/oauth.provider' ;
17
18
import { useFireEvents } from '@gitroom/helpers/utils/use.fire.events' ;
18
19
import { useVariables } from '@gitroom/react/helpers/variable.context' ;
19
20
import { useTrack } from '@gitroom/react/helpers/use.track' ;
@@ -91,7 +92,8 @@ export function RegisterAfter({
91
92
token : string ;
92
93
provider : string ;
93
94
} ) {
94
- const { isGeneral, neynarClientId, billingEnabled } = useVariables ( ) ;
95
+ const { isGeneral, genericOauth, neynarClientId, billingEnabled } =
96
+ useVariables ( ) ;
95
97
const [ loading , setLoading ] = useState ( false ) ;
96
98
const router = useRouter ( ) ;
97
99
const fireEvents = useFireEvents ( ) ;
@@ -163,7 +165,11 @@ export function RegisterAfter({
163
165
< GithubProvider />
164
166
) : (
165
167
< div className = "gap-[5px] flex flex-col" >
166
- < GoogleProvider />
168
+ { genericOauth && isGeneral ? (
169
+ < OauthProvider />
170
+ ) : (
171
+ < GoogleProvider />
172
+ ) }
167
173
{ ! ! neynarClientId && < FarcasterProvider /> }
168
174
{ billingEnabled && < WalletProvider /> }
169
175
</ div >
You can’t perform that action at this time.
0 commit comments