Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/#26 feat sns login #30

Open
wants to merge 31 commits into
base: develop
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
d6cbb56
#26 [fix] Fix retrofit error
imseongwoo Nov 21, 2022
e23cb0f
#26 [add] Add matchNaverAccount func in RegexUtil.kt
imseongwoo Dec 29, 2022
f5ecedc
#26 [add] Add kakao login
imseongwoo Dec 29, 2022
50121cf
#26 [add] Add naver login
imseongwoo Dec 29, 2022
ab3d673
#26 [add] Add social auto login
imseongwoo Dec 30, 2022
3f71536
#26 [chore] Extract string
imseongwoo Dec 30, 2022
09a63a5
#26 [chore] Delete unuse library
imseongwoo Dec 30, 2022
2992479
#26 [mod] Modify code convention
imseongwoo Dec 30, 2022
58bb6b6
#26 [add] Add getCustomKakaoSignUpEmail function
imseongwoo Jan 2, 2023
01f45e2
#26 [chore] Delete unuse string value
imseongwoo Jan 2, 2023
5fc3dcd
Merge branch 'develop' of https://github.com/BCSDLab/JJBAKSA-ANDROID …
imseongwoo Jan 6, 2023
713500f
#26 [chore] Move business logic to viewmodel
imseongwoo Jan 6, 2023
6e85a9f
#26 [chore] Move naver login business logic to viewmodel and remove u…
imseongwoo Jan 6, 2023
5b3b164
#26 [chore] Delete unused signup function and unused import
imseongwoo Jan 6, 2023
85f532e
#26 [chore] Refactoring login business logic
imseongwoo Jan 7, 2023
d9cc432
#26 [chore] Delete unuse import
imseongwoo Jan 7, 2023
9cd1f7f
#26 [chore] Delete unuse file
imseongwoo Jan 7, 2023
163ce27
#26 [chore] Modify social login code
imseongwoo Jan 7, 2023
e70d4ac
#26 [chore] Modify indentation
imseongwoo Jan 7, 2023
e3bbfb4
#26 [chore] Modify indentation
imseongwoo Jan 7, 2023
2a69c96
#26 [chore] Modify socialLogin function variable to meaningful
imseongwoo Jan 9, 2023
7fafaca
#26 [add] Add email authenticate
imseongwoo Jan 9, 2023
36a82cd
#26 [mod] Modify custom kakao email to user's kakao email
imseongwoo Jan 10, 2023
fb3ec36
#26 [chore] Delete wildcard import
imseongwoo Jan 10, 2023
960849f
#26 [add] Add onBackPressed() function
imseongwoo Jan 10, 2023
b260358
#26 [add] Add Event class
imseongwoo Jan 14, 2023
e6b6548
#26 [add] Add scalar convert factory
imseongwoo Jan 14, 2023
599781e
#26 [add] Add kakao login
imseongwoo Jan 14, 2023
c644f85
#26 [chore] mod code convention
imseongwoo Jan 14, 2023
42d79cd
#26 [chore] remove comment
imseongwoo Jan 14, 2023
cd02886
#26 [chore] Add new line in SocialLoginUrlMapper.kt
imseongwoo Jan 14, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
#26 [fix] Fix retrofit error
  • Loading branch information
imseongwoo committed Nov 21, 2022
commit d6cbb56ae47b77b40cfdf4926a43dad979041c31
6 changes: 4 additions & 2 deletions app/src/main/java/com/jjbaksa/jjbaksa/di/NetworkModule.kt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package com.jjbaksa.jjbaksa.di

import android.content.Context
import androidx.datastore.preferences.core.stringPreferencesKey
import com.google.gson.GsonBuilder
import com.jjbaksa.data.BASE_URL
import com.jjbaksa.data.api.AuthApi
import com.jjbaksa.data.api.NoAuthApi
Expand Down Expand Up @@ -35,6 +36,7 @@ annotation class NOAUTH
@Module
@InstallIn(SingletonComponent::class)
object NetworkModule {
private val gson = GsonBuilder().setLenient().create()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

해당 객체가 필요한 이유가 혹시 있나요?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use JsonReader.setLenient(true) to accept malformed JSON 이라는 에러가 발생해서 gson 객체 설정 후 retrofit 객체에 추가하였습니다.

private val httpLoggingInterceptor = HttpLoggingInterceptor().apply {
level = if (JjbaksaApp.instance.isDebug) {
HttpLoggingInterceptor.Level.BODY
Expand Down Expand Up @@ -133,7 +135,7 @@ fun provideRefreshInterceptor(): Interceptor {
return Retrofit.Builder()
.client(okHttpClient)
.baseUrl(BASE_URL)
.addConverterFactory(GsonConverterFactory.create())
.addConverterFactory(GsonConverterFactory.create(gson))
.build()
}

Expand All @@ -144,7 +146,7 @@ fun provideRefreshInterceptor(): Interceptor {
return Retrofit.Builder()
.client(okHttpClient)
.baseUrl(BASE_URL)
.addConverterFactory(GsonConverterFactory.create())
.addConverterFactory(GsonConverterFactory.create(gson))
.build()
}

Expand Down