Skip to content

Shifty magic link#51

Merged
A-Guldborg merged 7 commits intomainfrom
feature/magic-link
Apr 29, 2025
Merged

Shifty magic link#51
A-Guldborg merged 7 commits intomainfrom
feature/magic-link

Conversation

@A-Guldborg
Copy link
Contributor

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.

@A-Guldborg A-Guldborg requested review from TTA777, Copilot and duckth April 28, 2025 18:29
@A-Guldborg A-Guldborg self-assigned this Apr 28, 2025
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@A-Guldborg A-Guldborg merged commit 8cb1dfb into main Apr 29, 2025
2 checks passed
@A-Guldborg A-Guldborg deleted the feature/magic-link branch April 29, 2025 10:30
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.

2 participants