I
I
Ilya2019-03-12 18:49:37
React Native
Ilya, 2019-03-12 18:49:37

How to implement OAuth2 at React Native Expo?

Hello, please help me to implement OAuth2 at Expo.
Maybe there is an article or video.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey Panteleev, 2019-03-12
@ynizhenie

During the initial authorization, write access_token, refresh_tokenand expires_inin SecureStore
Next, in the requests, check whether it has expired expires_in- if it has expired, make a request to refresh the token by updating the data in SecureStore, if it has not expired, make a request with the current token
Check for request errors if the request has not passed (for example, a token revoked) – also send a request to refresh the token

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question