Skip to content
Back

Need help with OAuth - React Native

  • 0
  • Self Hosted
  • Auth
  • React Native
Faye
17 May, 2024, 14:31

Hello.

I need some help on how to properly implement the oauth feature into my login view. I am getting a link to my api url, and I can login into discord, but when it asks me to open an "external app" (ios), it doesn't do anything.

This is my code for logging in:

TypeScript
  const handleOAuth2Login = (provider: OAuthProvider) => {
    try {
      const data = account.createOAuth2Session(provider)
      return Linking.openURL(`${data}`)
    } catch (error) {
      console.log(error)
    }
  }
TL;DR
Developers are having trouble implementing OAuth into their React Native login view. When prompting to open an "external app" (iOS), nothing happens. The code provided seems correct, but there might be an issue with the Linking module in React Native. Check Linking documentation and ensure proper configurations for handling external app opening are in place.
Faye
17 May, 2024, 14:40
Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more