1

In our company we decided that we will not use separate Login/Register/ChangePassword forms for React Weband React Native and we will rather make React Web forms once and them reuse them in React Native.

This means that user of Native app clicks on Login button and default browser is opened to log in. After successfull login, user is redirected back into Native app as alrady logged.

I think this is very common in Hybrid Native apps, but I not found any docs how to achieve this in React Native.

Can anybody help me with quick example or redirect me to some docs/post?

1 Answer 1

1

You could use react-native-webview to open the company login url, and pass a injectedJavascript props to WebView component that when the user is logged in you get the elements with user's data(Ex: getElementById("userName")) and close WebView redirecting user back to the app.

Extra Information here;

WebView props here so you can know how to control it.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.