Skip to content

Logout on Unauthorized access #1864

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
May 20, 2025
Merged

Conversation

Shreyash16b
Copy link
Contributor

@Shreyash16b Shreyash16b commented May 11, 2025

Issue Fix

Jira Task: https://mifosforge.jira.com/browse/MW-206

Description

  1. Intercept to view the HttpResponse for HttpStatusCode.Unauthorized
  2. Create a global MutableStateFlow isUnauthorized
  3. Logout of the application

Video

LogoutUnauthorized.mp4

When an invalid token is present in the header the app asks user to login again.

  • Apply the AndroidStyle.xml style template to your code in Android Studio.

  • [✅] Run the unit tests with ./gradlew check to make sure you didn't break anything

  • [✅] If you have multiple commits please combine them into one commit by squashing them.

Copy link
Collaborator

@niyajali niyajali left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi! Thank you for your efforts, here's few things we need to address, and let us know or mention me after you fix these we'll proceed with merge.

@Shreyash16b
Copy link
Contributor Author

@niyajali I have made the suggested changes

Copy link
Collaborator

@niyajali niyajali left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me can be merged, can you upload a video to demonstrate this functionality and work as expected. After that we'll proceed with merge.

@Shreyash16b
Copy link
Contributor Author

For the video demonstration, i modified the header token to trigger the interceptor and get a HttpStatus.UNAUTHORIZED.
This seemed like the only practical way I could get it for testing.

@niyajali
Copy link
Collaborator

@Shreyash16b After watching the video that you've shared cancel button is unnecessary not good for UI/UX, remove it and only keep "Ok" button.

@niyajali
Copy link
Collaborator

Also update the dialog title and message with proper human understandable text.

@Shreyash16b
Copy link
Contributor Author

@niyajali I have made the required changes.

@niyajali niyajali enabled auto-merge (squash) May 20, 2025 13:59
@niyajali niyajali disabled auto-merge May 20, 2025 15:03
@niyajali niyajali merged commit b3c9b3f into openMF:development May 20, 2025
6 of 7 checks passed
@niyajali
Copy link
Collaborator

@Shreyash16b Hi, Thanks for the PR, Did you joined our slack community if not join now(link in readme) and join our channel mifos-pay channel and if you would like to work on other tickets then let's us know on channel we'll assign some tickets.

@Shreyash16b
Copy link
Contributor Author

@niyajali Thank you, I have joined the slack channel and am assigned another ticket.

@niyajali
Copy link
Collaborator

Hi, that's great, but I suggest joining our daily standup and our project maintainer(Rajan Sir) will assign you some tickets which we're currently focusing on.

@Shreyash16b
Copy link
Contributor Author

Yes, I am attending the standup regularly and Rajan Sir has assigned tickets to me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants