57 authentication#58
Merged
christiannagel merged 16 commits intomainfrom May 15, 2024
Merged
Conversation
…ay.razor and removed scoped-css file.
…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.
Closed
christiannagel
approved these changes
May 15, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 version8.0.5of several Microsoft packages.IGamerNameSuggestionClient.cs: New interface added for getting gamer name suggestions.Authentication.razorandGamePage.razor: Updated to use Fluent UI components for better user interaction.GamePage.razor.csandProgram.cs: Updated with logic for handling gamer name suggestions, persisting gamer names, and using MSAL for authentication.appsettings.Development.jsonandappsettings.json: Updated to include a newUserApiBasesetting and settings for Azure AD B2C.Warning
With this PR the application only renders with InteractiveWebassembly-mode without prerendering.