Skip to content

57 authentication#58

Merged
christiannagel merged 16 commits intomainfrom
57-authentication
May 15, 2024
Merged

57 authentication#58
christiannagel merged 16 commits intomainfrom
57-authentication

Conversation

@szv
Copy link
Copy Markdown
Collaborator

@szv szv commented May 15, 2024

PR Classification

This pull request introduces new features and updates to the CodeBreaker gamepage, including gamer name suggestions, and UI improvements. Primarily this PR is focuesed on authentication through Azure AD B2C and using MSAL for authentication.

PR Summary

This pull request significantly enhances the user experience and functionality of the CodeBreaker game.

  • CodeBreaker.Blazor.Client.csproj: Updated to use version 8.0.5 of several Microsoft packages.
  • IGamerNameSuggestionClient.cs: New interface added for getting gamer name suggestions.
  • Authentication.razor and GamePage.razor: Updated to use Fluent UI components for better user interaction.
  • GamePage.razor.cs and Program.cs: Updated with logic for handling gamer name suggestions, persisting gamer names, and using MSAL for authentication.
  • appsettings.Development.json and appsettings.json: Updated to include a new UserApiBase setting and settings for Azure AD B2C.

Warning

With this PR the application only renders with InteractiveWebassembly-mode without prerendering.

szv added 16 commits May 15, 2024 02:04
…cation.razor and defined templates for different authentication states (of RemoteAuthenticationView).
… Authentication currently does not work with serverside-mode.
This commit includes significant changes to the HttpClient configuration and the application's configuration properties. The HttpClient for "GameApi" has been replaced with two new HttpClients, `IGamerNameSuggestionClient` and `IGamesClient`, each configured with their respective base addresses "UserApiBase" and "GameApiBase". The "ApiBase" configuration property has been renamed to "GameApiBase" and a new "UserApiBase" property has been added, which is set to "https://localhost:7133/" in the development settings. The `AddHttpClient` calls have been relocated from `AddRazorComponents` to `AddMsalAuthentication` in `Program.cs`. No other changes have been made to the `AddMsalAuthentication` method, and the `IMobileDetectorService` continues to be added as a scoped service. The "DetailedErrors" configuration property remains set to true.
Updated `GamePage.razor` and `GamePage.razor.cs` to improve handling of gamer names. Changes include conditional rendering of UI elements based on the `_isNamePrefilled` variable, replacement of `_name` with `_gamerName` and `_gamerNameSuggestions`, and addition of new variables to track loading state and persisting state. Services for fetching gamer name suggestions and handling persisting state have been injected. Methods for initializing, starting game, and disposing have been updated accordingly. A new method for persisting gamer name and suggestions has been added.
Updated the render mode for the `Routes` component in the `App.razor` file from `InteractiveWebAssembly` to a new instance of `InteractiveWebAssemblyRenderMode` with a parameter of `false`. Also, a new `FluentTooltipProvider` component has been added to the `App.razor` file to provide tooltips for other components in the application.
@szv szv linked an issue May 15, 2024 that may be closed by this pull request
@szv szv requested a review from christiannagel May 15, 2024 09:05
Base automatically changed from 55-simplification-ui to main May 15, 2024 16:19
@christiannagel christiannagel merged commit e29971d into main May 15, 2024
@christiannagel christiannagel deleted the 57-authentication branch May 15, 2024 16:20
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.

Authentication

2 participants