Expo - Google Login - 개발 모드

Harry Jung·2023년 5월 4일
0

Google Login을 사용할 경우 3가지의 Client Id가 필요하다.

const [request, response, promptAsync] = Google.useAuthRequest({
    androidClientId: '1034425575410-valr2tudfct7kfgac97j9oh01g989guc.apps.googleusercontent.com',
    iosClientId: '1034425575410-bea8rtsq4gijtqi8blvuo58vg0t79ng3.apps.googleusercontent.com',
    expoClientId: '1034425575410-1j3ma1klh6md8bq1maqkt7qd7ifa5ag5.apps.googleusercontent.com'
  });

위 Client Id는 Console Google Cloud 에서 받으면 된다.
https://console.cloud.google.com/apis/credentials?project=ausparcel

참고자료:
유투브: https://www.youtube.com/watch?v=oPTGoJw_Tik
expo 공식문서: https://docs.expo.dev/guides/google-authentication/

#1. 구글에서 client Id 받으려면 먼저 프로젝트를 등록해야 함.

ausParcel 프로젝트를 등록하고 0Auth consent Screen에서 다시 ausParcel을 등록함.
기본 내용을 입력하면 쉽게 등록이 된다. (유투브 참고)

#2. 등록후 Credentials 안으로 들어가서 client Id를 받으러 가면 된다.

IOS 와 webApplication(expo) 는 일반적으로 등록하면 전혀 문제가 안됨.
package Name: com.enesdyaz.ausParcel
android는 SHA-1 을 받아야 하기 때문에

eas credentials -p android
Keystore: Manage everything needed to build your project
Set up a new keystore >
select the default value for Assign a name to your build credentials >
press Y to Generate a new Android Keystore.

이 번호를 구글 콘솔에 입력하면 client Id를 받을 수가 있다.

profile
Dreamsoft

0개의 댓글