feat: 로그인 화면
This commit is contained in:
17
src/features/auth/api/authApi.ts
Normal file
17
src/features/auth/api/authApi.ts
Normal file
@@ -0,0 +1,17 @@
|
||||
import { apiClient } from '@/shared/lib/apiClient';
|
||||
import { SocialLoginRequest, AuthResponse } from '../types';
|
||||
|
||||
export const authApi = {
|
||||
/**
|
||||
* 프론트엔드에서 발급받은 소셜 토큰을 백엔드로 전송하여 VibeRoom 전용 토큰으로 교환합니다.
|
||||
* @param data 구글/애플/페이스북에서 발급받은 Provider 이름과 Token
|
||||
*/
|
||||
loginWithSocial: async (data: SocialLoginRequest): Promise<AuthResponse> => {
|
||||
return apiClient<AuthResponse>('/auth/social', {
|
||||
method: 'POST',
|
||||
body: JSON.stringify(data),
|
||||
});
|
||||
},
|
||||
|
||||
// TODO: 이후 필요 시 logout, refreshAccessToken 등 인증 관련 API 추가
|
||||
};
|
||||
Reference in New Issue
Block a user