E
E
Evgeny Koryakin2019-04-05 23:22:16
React
Evgeny Koryakin, 2019-04-05 23:22:16

How to authorize a client through a web form?

Hello.
My Application works using Rest api.
Due to the peculiarity of authorization, it is possible to use only the web form.
The application itself is written in React and compiled through React Native + WebView.
How to maintain a session opened via a Web form?
CMS - WordPress.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Roman Alexandrovich, 2019-04-06
@zettend

after authorization, get your cookie and use https://github.com/joeferraro/react-native-cookies to put it in webview. If you need to exit, just wipe all the cookies. This method worked for me. By the way, webview from react-native is better not to use, since they moved it into a separate package https://github.com/react-native-community/react-na... in which they have already fixed a lot of things and, in general, webview when correct written authorization and transmission of cookies itself remembers them and there is no need to install and grind anything anywhere.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question