Quantcast
Channel: Ionic Forum - Latest posts
Viewing all articles
Browse latest Browse all 228595

How to handle user's request when OAuth Access token expire?

$
0
0

Hi,
I'm new to ionic & angular, currently trying to build an android app. Using OAUTH 2(also new at here) for resource authorization. Now, stuck at one point & want to know how you peoples handle such issues.

Basically, in my app there 3 different blocks communicate with each other to do the job. These are -
1 - Client-side app(ionic app)
2 - Resource Server
3 - OAuth Server

After successfully, getting the Access_Token & Refresh_Token from OAuth Server, whenever the Client-side app needs any resource it makes an HTTP request to Resource Server by attaching the Access_Token with the request. Then Resource Server verify that Access_Token with OAuth server. If Access_Token found as valid Resource Server return the desire resource else return error.

So, here my problem is - if Access_Token has expired & in Client-side I got the error also from Resource Server, then how I'll get the new Access_Token & resend that with a new HTTP request. Because, the moment I'll make an HTTP request for a new Access_Token, I'll lose the previous User's Request. Then, after getting the new Access_Token, how I'll trigger old HTTP request of the user's to get his/her required resources.


Viewing all articles
Browse latest Browse all 228595

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>