OAuth with React Native and Slack

Last week I’ve been building a React Native app. My goal was to add ‘Sign in with Slack’ functionality.

The problem was: slack does not support non-http redirects.

The solution for ios was just to intercept the redirect and read the code with javascript.

On android, I’ve created http deep link to my app. After user clicked ‘Sign in with Slack’ button, I open Slack’s login page in the browser. This is very important not to open a page with WebView component because deep links do not work with it.