Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Supabase auth
와 연동 시, 이메일/패스워드 로그인은 잘 동작하지만,oauth
기반의 로그인(ex.google
,facebook
)은 공식문서에서 제공하는 API를 사용할 시 앱에서 리다이렉션이 일어나지 않고 아래와 같은 값을 리턴 해줍니다.따라서 모바일 환경에서는 expo-auth-session을 사용하여 직접 로그인을 시도 해줍니다.
웹
웹에서
auth-session
을 사용할 시, 제대로 리다이렉션을 처리하지 못하 상황이 발생해서, 기존API
방식을 사용합니다. 이 경우, 로그인 이후 세션이 제대로 설정되지않고url
의 형태가 웹에서 바로 읽을 수 없는 형태로 들어오기 때문에 (쿼리 스트링의 시작점이?
가 아닌#
)useWebAuth
라는 커스텀 훅을 만들어서url
을 처리해줍니다.안드로이드
안드로이드의 경우,
expo-router
의 문제로auth-session
으로 인증 이후, 리다이렉션을 했을 때, 제대로linking
이 되지않아Unmatched url
에러가 납니다. 이를 대처하기 위해[...unmatched].tsx
라우트를 루트에 만들어서 라다이렉션만 담당해줍니다.References