chen-rn / CUA

(deprecateed) create-universal-app(CUA) is an opinionated template for creating fullstack universal apps (Expo, Next, tRPC, Prisma, Clerk, Solito, Tamagui)
https://cua-demo.vercel.app
MIT License
1.02k stars 67 forks source link

[BUG] AuthSession.startAsync no longer supported in expo-auth-session #84

Open sethi-ishmeet opened 1 year ago

sethi-ishmeet commented 1 year ago

Describe the bug I am not able to work around the OAuth Signin/signup as the startAsync method is not supported anymore by Expo AuthSession.

To Reproduce Steps to reproduce the behavior:

  1. Upgrade Expo and expo-auth-session to latest version
  2. Sign In with any OAuth provider
  3. See error

Expected behavior Login/Signup should work as expected.

Screenshots Screenshot 2023-07-07 at 9 38 45 PM

Screenshot 2023-07-07 at 9 42 08 PM

Able to repro on iOS simulator and device.

dozken commented 1 year ago

Hi @sethi-ishmeet, I believe you've upgraded expo to v49 here is workaround to that https://blog.expo.dev/expo-sdk-49-c6d398cdf740#:~:text=AuthSession%20proxy%20has,%2C%20Google.

sethi-ishmeet commented 1 year ago

@dozken does that mean we cannot use this method of Authentication? When using clerk, would you recommend using their sign in components directly on the Expo side? I guess I wouldn't wanna do that because it will defeat the purpose of having the monorepo at the first place.

PS - please excuse me for naive questions as I'm transitioning to RN from native iOS development and not very familiar with patterns used here.

dozken commented 1 year ago

@dozken does that mean we cannot use this method of Authentication? When using clerk, would you recommend using their sign in components directly on the Expo side? I guess I wouldn't want to do that because it would defeat the purpose of having the monorepo in the first place.

I'm not RN expert either but I believe you could do as they described here https://clerk.com/docs/quickstarts/get-started-with-expo in the ui module, not touching the expo module directly.

I think the intention of this repository was to give some experience on how to build a single component for both Frontend App and Mobile App, but not a guide on how to do authentication.

I suggest not updating any dependency in this library if you are new to RN until you are confident to do so. Because it works out of the box, at least on localhost.

sethi-ishmeet commented 1 year ago

@dozken I see, I actually used the Tamagui starter and added the Clerk Auth on top from this repo. A better idea would be to use this repo as a starter in my case I guess.