- Abp 6.4
- Angular 12
- .NET CORE 5
Hi,
I would like to manage the AbpAuthorizationException on Xamarin mobile app the same as Angular app. Right now, when the authorization token expires on angular app, a message is shown "CurrentUserDidNotLoginToTheApplication" and web page is automatically refreshed. This leads the user to the angular login page. I don't know were this behavior is implemented (abp-web-ressources ?), can you please provide a link to that piece of code ?
My goal is to do the same on Xamarin app... if auth token is expired, try to login again on background or display login page.
4 Answer(s)
-
0
Hi,
Xamarin uses https://github.com/aspnetzero/aspnet-zero-core/blob/dev/aspnet-core/src/MyCompanyName.AbpZeroTemplate.Application.Client/ApiClient/AbpApiClient.cs for communicating with the server. You can change its methods to handle AbpAuthorizationException.
-
0
Hi @ismcagdas,
Thanks for your answer. I know very well AbpApiClient class but I don't think it is the best way to manage AbpAuthorizationException ; I plan to manage it on WebRequestExecuter class which already manages HTTP exceptions.
My question was not were to manage this on mobile app :)
My question is to know where AbpAuthorizationException is managed on Angular app. Today, when AbpAuthorizationException is received on Angular side, the page is automatically refreshed.
I just want to know where this is implemented on angular project
-
0
Hi @ricavir
Sorry, on Angular side, it is managed in the HttpInterceptor, in the following lines;
then, handled here;
-
0
Perfect, thks @ismcagdas