Open Closed

AbpAuthorizationException management #10581


0
ricavir created
  • 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.


2 Answer(s)
  • 0
    ismcagdas created
    Support Team

    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
    ricavir created

    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