dbAuth for a React Native app using redwood js?

If I’m planning on later making a react native app to consume the redwood api, would dbAuth work well with that? Or would it be better to just use a third-party provider?

Hello!

dbAuth is currently very focused towards the web experience - but you should be able to use it within a react native app. Because dbAuth uses Cookies, you’ll need to open a WebView or something like react-native-inappbrowser-reborn - npm - to sign in and grab the cookie by going to the /login page, and grab the cookie that it sets - this is likely to be easier than directly making the login request.

However - it may be simpler to start with social auth providers, as it’ll be easy for you to grab the auth token from their auth sdks, and simply pass it along with your graphql requests in the authorization and auth-provider headers.

Thanks!

1 Like