Merged
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR refactors authentication functionality to support a new magic link login flow by removing the now-unused password field and updating token handling. Key changes include:
- Modifying authentication interfaces and implementations to remove password parameters and add token-based Authenticate and Refresh methods.
- Updating UI components to remove password inputs and invoke the new authentication methods.
- Introducing a new Authentication.razor page to process token authentication.
Reviewed Changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| Shifty.App/Services/IAuthenticationService.cs | Removed password parameter from LoginUser and added Authenticate and Refresh methods to support token-based login |
| Shifty.App/Services/AuthenticationService.cs | Adjusted LoginUser implementation to only require a username and added support for token refresh and authentication |
| Shifty.App/Repositories/IAccountRepository.cs | Updated LoginAsync signature to remove password and added AuthenticateAsync method |
| Shifty.App/Repositories/AccountRepository.cs | Revised LoginAsync to align with the new login process and implemented AuthenticateAsync |
| Shifty.App/Pages/Login.razor | Removed the password input field and updated method calls to reflect the new API |
| Shifty.App/Components/RedirectToLogin.razor | Updated redirection logic to asynchronously refresh tokens before proceeding |
| Shifty.App/Authentication/Authentication.razor | New component added for processing token authentication from query parameters |
duckth
approved these changes
Apr 29, 2025
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.
Removes password field in Shifty as this field is no longer used for the new magic link functionality.
Similarly adds handling the tokens in localstorage, and when user is redirected to login, it will check if they have a refresh token and attempt to use this to re-authenticate the user.