Handle unauthorized behaviour

Hello, community.
I’m developing a plugin for Jira Cloud.
I would like to show some message if the user is not authorized on Jira Instance. I used to use “errorTemplate: true” configuration. But now that’s not a case because of enabled caching.

The issue is: while I’m trying to get add-on page I see no req object in my personal middleware than I’m using instead authenticate(). In the browser console, I see the message “Could not get announcement from server” and a bunch of 401 messages.

At the same time, there is an infinite loading spinner that ends with “Something went wrong”.

If someone faced the same behavior, could you please clarify how can we get the request on the backend with the unauthorized user? Because as I thought the behavior should not be different.

Also, we have user_is_logged_in maybe here is a place where the request is not passing.

Many thanks.
Igor Piskunov

1 Like

The issue is resolved by removing user_is_logged_in from atlassian-connect.json.

1 Like