Skip to content
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

Feature: Add redirect button on snackbar when http status code is 401 #2333

Merged
merged 3 commits into from
Jul 21, 2023

Conversation

hocinehacherouf
Copy link
Contributor

Description

What's new?

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • Tests
  • Other

@codecov
Copy link

codecov bot commented Jul 18, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.02 🎉

Comparison is base (f78f2f0) 88.43% compared to head (d661807) 88.46%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2333      +/-   ##
==========================================
+ Coverage   88.43%   88.46%   +0.02%     
==========================================
  Files         296      296              
  Lines       11314    11338      +24     
==========================================
+ Hits        10006    10030      +24     
  Misses       1308     1308              
Impacted Files Coverage Δ
...ub.Portal.Client/Handlers/ProblemDetailsHandler.cs 100.00% <100.00%> (ø)
src/IoTHub.Portal.Client/Shared/Error.razor 57.57% <100.00%> (+4.24%) ⬆️

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

Comment on lines +142 to +146
.Respond(System.Net.HttpStatusCode.Unauthorized, new StringContent(
JsonConvert.SerializeObject(problemDetailsWithExceptionDetails),
Encoding.UTF8,
MediaTypeNames.Application.Json));

Check warning

Code scanning / CodeQL

Missing Dispose call on local IDisposable

Disposable 'StringContent' is created but not disposed.
Comment on lines +153 to +156
var httpClient = new HttpClient(problemDetailsHandler)
{
BaseAddress = new Uri("http://fake.com")
};

Check warning

Code scanning / CodeQL

Missing Dispose call on local IDisposable

Disposable 'HttpClient' is created but not disposed.
@hocinehacherouf hocinehacherouf force-pushed the Feature/2193_redirect_to_login_when_token_expired branch from 763ff34 to 931ad15 Compare July 18, 2023 19:32
@hocinehacherouf hocinehacherouf marked this pull request as ready for review July 18, 2023 19:32
@hocinehacherouf hocinehacherouf requested a review from a team as a code owner July 18, 2023 19:32
@hocinehacherouf hocinehacherouf force-pushed the Feature/2193_redirect_to_login_when_token_expired branch from 931ad15 to 7c21766 Compare July 20, 2023 22:32
@kbeaugrand kbeaugrand force-pushed the Feature/2193_redirect_to_login_when_token_expired branch from 7c21766 to d661807 Compare July 21, 2023 18:08
@kbeaugrand kbeaugrand enabled auto-merge (squash) July 21, 2023 18:16
@kbeaugrand kbeaugrand merged commit ca67d1b into main Jul 21, 2023
@kbeaugrand kbeaugrand deleted the Feature/2193_redirect_to_login_when_token_expired branch July 21, 2023 18:25
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.

Story: As a user I want to have a better UX when the authentication token expires
2 participants