inflearn logo
강의

강의

N
챌린지

챌린지

멘토링

멘토링

N
클립

클립

로드맵

로드맵

지식공유

리액트 네이티브 구글 로그인

275

작성자 없음

작성한 질문수 0

0

안녕하세요 지금 expo go에서 구글 로그인 연결 중 인데요.

redirectUri를 https://auth.expo.io/@your-username/your-app-slug 식으로 입력하면 Something went wrong trying to finish signing in. Please close this screen to go back to the app. 화면이 뜨면서 액세스 토큰은 불러와지는 것 같고, 밑에 방식으로 하면 redirectUri가 exp://ip주소:포트번호 로 나오면서 구글 클라우드 콘솔에 등록을 할 수가 없는데 어떻게 해결하면 좋을까요?.. 도와주시면 감사하겠습니다..

 const [request, response, promptAsync] = Google.useAuthRequest({
    clientId: process.env.GOOGLE_CLIENT_ID,
    //redirectUri: 'https://auth.expo.io/@your-username/your-app-slug',
    redirectUri: makeRedirectUri({ useProxy: true } as any),
    scopes: ['profile', 'email'],
  });

react react-native expo google expo-auth-session

답변 1

0

eggmun(문성진)

안녕하세요.
어떤 라이브러리를 사용하시나요?

만약 @react-native-google-signin/google-signin 이 패키지를 사용하신다면 expo go에서는 사용 못 합니다. 아래 공식 문서에 나와 있습니다.
https://docs.expo.dev/guides/google-authentication/

 

만약 사용하고 싶으시면 https://docs.expo.dev/develop/development-builds/introduction/ development build를 하시거나 실제 운영 빌드를 하셔서 사용하셔야 될 거 같습니다!

0

eggmun(문성진)

Google.useAuthRequest

위에서 Google 객체의 useAuthRequest 메서드는 어떤 패키지에서 가져오는지 궁금합니다

0

eggmun(문성진)

위 라이브러리도 똑같이 expo go에서 사용이 불가하다고 합니다.

 

  • Expo Go cannot be used for local development and testing of OAuth or OpenID Connect-enabled apps due to the inability to customize your app scheme. You can instead use a Development Build, which enables an Expo Go-like development experience and supports OAuth redirects back to your app after login in a manner that works just like it would in production.

https://docs.expo.dev/guides/authentication/

1

eggmun(문성진)

위 라이브러리를 로컬에서 테스트 하고 싶다면 development build를 하셔야 됩니다!

development build에 대해 모르는게 있으시면 물어보셔도 됩니다!

prd생성 관련 소스..

0

6

1

토큰오류 아시나요?

0

10

1

유튜브 시연 영상 추가 기능 강의 업로드 계획

0

7

1

(VS코드) install command 아무리 해도 안나옵니다

0

12

1

강의 수강 후 포트폴리오 준비 방향에 대해 조언 부탁드립니다.

2

13

1

@/styles/globals.css'

0

16

2

VS Code의 Command pallet에서 'install command'해도 'code' command가 안보입니다.

0

22

1

파일 디렉토리 구조가 다르네요

0

22

1

클로드 초기설정

0

27

1

슬슬 따라하기가 힘들어진다.

0

62

2

[문의] 섹션 7 미션 진행 중...

0

29

2

기본 브랜치의 이름이 master에요.

0

39

2

관리자 페이지 질문

0

21

1

plans 생성이 안됩니다.

0

35

3

더빙에 어떤 ai가 쓰였는지 궁금합니다.

0

41

2

보안 적용에 대한 강의가 있을까요?

0

28

2

Auto-memory 기능

0

31

2

64강 context 7 관련 질문

0

32

2

Auto-memory 기능

0

27

1

55강 7분56초

0

24

1

55강 git 초기화 관련 질문이요

0

28

2

클로드 코드에 붙여넣기후 편집 관련 질문입니다!

0

30

2

존재하지 않는 일기 url입력 시 alert이 두 번 떠요

0

33

1

윈 터미널의 클로드와 에디터의 터미널의 클로드에 관한 질문

0

19

2