# OAuth 2.0 authentication on React Native

**URL:** <https://staging-discuss.dev.twitch.com/t/oauth-2-0-authentication-on-react-native/16325>\
**Category:** API\
**Created:** [June 24, 2018, 12:50pm UTC](https://staging-discuss.dev.twitch.com/t/oauth-2-0-authentication-on-react-native/16325 "2018-06-24T12:50:39Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Occasus](https://avatars.discourse-cdn.com/v4/letter/o/0ea827/32.png) [@Occasus](https://staging-discuss.dev.twitch.com/u/Occasus)\
**Post date:** [June 24, 2018, 12:50pm UTC](https://staging-discuss.dev.twitch.com/t/oauth-2-0-authentication-on-react-native/16325/1 "2018-06-24T12:50:39Z")

</div>

Hey everybody,

I’ve been trying to add Twitch authentication (via OAuth 2.0/OpenID) to my React Native app for a while.

I’ve tried a few generic OAuth packages for react native but I can’t seem to get any to work with Twitch. The closest I got so far was with react-native-app-auth (opened an issue on GitHub, but received no comments so far:[https://github.com/FormidableLabs/react-native-app-auth/issues/127](https://github.com/FormidableLabs/react-native-app-auth/issues/127)).

Has anyone here managed to get Twitch authentication working on their React Native app? I’ve searched quite a bit and to my dismay could not find anything relevant.

Would be grateful for any insights/ideas.  
Thanks!

---

<div class="post-metadata">

**Author:** ![BarryCarlyon](https://d1d6mrmdu7ztse.cloudfront.net/user_avatar/staging-discuss.dev.twitch.com/barrycarlyon/32/253_2.png) [@BarryCarlyon](https://staging-discuss.dev.twitch.com/u/BarryCarlyon)\
**Post date:** [June 25, 2018, 8:42am UTC](https://staging-discuss.dev.twitch.com/t/oauth-2-0-authentication-on-react-native/16325/2 "2018-06-25T08:42:54Z")

</div>

What problems error codes are you running into?

oAuth is relatively straightforward, but the secrets should/ought to be handled server side, which I imagine is where you are running into a hiccup?

---

<div class="post-metadata">

**Author:** ![Occasus](https://avatars.discourse-cdn.com/v4/letter/o/0ea827/32.png) [@Occasus](https://staging-discuss.dev.twitch.com/u/Occasus)\
**Post date:** [June 25, 2018, 10:06pm UTC](https://staging-discuss.dev.twitch.com/t/oauth-2-0-authentication-on-react-native/16325/3 "2018-06-25T22:06:05Z")

</div>

I’m trying to get an authorization code from /authorize on the frontend, and then send it over HTTPS to have it verified on my backend with a /token call, but I can’t get it to return the ID token on React Native.

The error I’ve been getting from the React Native package I’m trying to use is {“status”:400,“message”:“missing client secret”}, but it may be misconfigured, hence is why I’m looking to see if anyone got it to work with React Native before.

---

<div class="post-metadata">

**Author:** ![system](https://d2spem0quai2ol.cloudfront.net/original/2X/0/05909729875cce3b53e59d5561c4d23bb14948fc.png) [@system](https://staging-discuss.dev.twitch.com/u/system)\
**Post date:** [July 25, 2018, 10:06pm UTC](https://staging-discuss.dev.twitch.com/t/oauth-2-0-authentication-on-react-native/16325/4 "2018-07-25T22:06:07Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
