Skip to content
This repository has been archived by the owner on Dec 23, 2023. It is now read-only.

Commit

Permalink
oauth api path fix
Browse files Browse the repository at this point in the history
  • Loading branch information
JUtupe committed Apr 8, 2023
1 parent 38c6e22 commit aae0270
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/api/rest/auth/Auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { AxiosInstance } from 'axios';
import { AuthResponse } from './AuthResponse.interface';

export const authByProvidersToken = async (axios: AxiosInstance, provider: string, token: string, state?: string): Promise<AuthResponse> =>
axios.get<AuthResponse>(`/oauth/callback/${provider}`, {
axios.get<AuthResponse>(`/api/oauth/callback/${provider}`, {
params: {
code: token,
state,
Expand Down
6 changes: 3 additions & 3 deletions src/views/auth/signIn/SignInView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,18 +34,18 @@ export const SignInView: React.FC = () => {
<SocialMediaButton
label="GitHub"
icon={<Github width={20} height={20}/>}
href={`${__RESTAPI_URI__}/oauth/login/${ProvidersList.github}`} />
href={`${__RESTAPI_URI__}/api/oauth/login/${ProvidersList.github}`} />

<SocialMediaButton
label="Google"
icon={<Google width={20} height={20}/>}
href={`${__RESTAPI_URI__}/oauth/login/${ProvidersList.google}`} />
href={`${__RESTAPI_URI__}/api/oauth/login/${ProvidersList.google}`} />

{__DEV__ &&
<SocialMediaButton
label="GitHub Dev"
icon={<Roadblock width={20} height={20}/>}
href={`${__RESTAPI_URI__}/oauth/login/${ProvidersList.githubDev}`} />
href={`${__RESTAPI_URI__}/api/oauth/login/${ProvidersList.githubDev}`} />
}
</div>

Expand Down

0 comments on commit aae0270

Please sign in to comment.