Skip to content

Commit

Permalink
FIX!(Frontend): solve login being successful in frontend
Browse files Browse the repository at this point in the history
- restore set accessor for AuthResponseModel
- fix inconsistency string between cors policy configurationand application in Program.cs
  • Loading branch information
EveCrystali committed Nov 20, 2024
1 parent d465e44 commit 1ec1058
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Frontend/Models/AuthResponseModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ namespace Frontend.Models;

public class AuthResponseModel

Check notice on line 3 in Frontend/Models/AuthResponseModel.cs

View workflow job for this annotation

GitHub Actions / Qodana for .NET

Class is never instantiated (non-private accessibility)

Class 'AuthResponseModel' is never instantiated
{
public string? Token { get; }
public string? Token { get; set; }

Check warning on line 5 in Frontend/Models/AuthResponseModel.cs

View workflow job for this annotation

GitHub Actions / Qodana for .NET

Auto-property accessor is never used (non-private accessibility)

Auto-property accessor 'Token.set' is never used

public string? RefreshToken { get; }
public string? RefreshToken { get; set; }

Check warning on line 7 in Frontend/Models/AuthResponseModel.cs

View workflow job for this annotation

GitHub Actions / Qodana for .NET

Auto-property accessor is never used (non-private accessibility)

Auto-property accessor 'RefreshToken.set' is never used
}
2 changes: 1 addition & 1 deletion Frontend/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@

// Configure Cors policy to allow all origins because we are using Ocelot Api Gateway
// We need to allow all origins because Frontend and Auth are not on the same port
app.UseCors("AllowFrontend");
app.UseCors("AllowApiGateway");

app.UseMiddleware<TokenRefreshMiddleware>();

Expand Down

0 comments on commit 1ec1058

Please sign in to comment.