하루 기록

supabase, 로그인 시 localhost로 가버린다면? 본문

Today I Learned

supabase, 로그인 시 localhost로 가버린다면?

떼굴펜 2024. 6. 6. 15:07

공식 문서를 보면 options.redirectTo를 전달할 수 있다.

 

const { data, error } = await supabase.auth.signInWithOAuth({
  provider: 'github'
  options : {
     redirectTo : "로그인 완료 후 이동할 페이지 url"
  }
})

 

vercel 환경 변수에 등록하면 잘 할 수 있다.

 

 

 

 

 

 

 

 

 

 

https://supabase.com/docs/reference/javascript/auth-signinwithoauth

 

Sign in a user through OAuth | Supabase

 

supabase.com

 

 

'Today I Learned' 카테고리의 다른 글

[NextJs] 첫걸음  (0) 2024.06.20
glitch로 json server 배포 하기  (1) 2024.06.14
vercel, 도메인 연결  (0) 2024.06.06
인피니티 스크롤(무한 스크롤) 구현 : document scroll  (0) 2024.06.05
commit convention  (0) 2024.06.04