-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Login with magic link #289
base: main
Are you sure you want to change the base?
Conversation
fcc8943
to
b7cc783
Compare
2ec47d1
to
625f332
Compare
d62fe22
to
689b2f5
Compare
330ed37
to
874dada
Compare
Email service is going to be hard to test compared to the testing probably required, considering it is mostly building templates by replacing structured values. This is due to it opening files which is different between running tests locally and in our workflow. This leaves us slightly below required testing coverage requirements but imo it should be okay in this very case. Other than that, ready for review :) |
coffeecard/CoffeeCard.Models/DataTransferObjects/v2/User/UserLoginResponse.cs
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In addition to the specific comments, I would like the tests to use the builders instead, as well as the baseUnitTest class, Integration test @A-Guldborg ?
@@ -11,6 +11,8 @@ public class EnvironmentSettings : IValidatable | |||
|
|||
[Required] public string DeploymentUrl { get; set; } | |||
|
|||
[Required] public string ShiftyUrl { get; set; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You will also need to update the infra files for this to work as intended
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@duckth can you help with this part? I am not quite sure how the deployment works :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes
coffeecard/CoffeeCard.Models/DataTransferObjects/v2/User/UserLoginRequest.cs
Show resolved
Hide resolved
coffeecard/CoffeeCard.Models/DataTransferObjects/v2/User/UserLoginResponse.cs
Show resolved
Hide resolved
Please see #304. |
This pull requests addresses @TTA777 review on #289 wrt using test data builders. This PR ensures we use builders for our models during testing. Though for our tokens we need to give it our custom instantiator, as we would like to keep the property of having the Token type require the two parameters token hash and token type and using this information to set the default expired `DateTime`, but still allowing us to overwrite this time for multiple purposes (testing, specific purposes at a later stage etc.). This PR also introduces integration tests for the new magic link authentication flow, only mocking the actual `IEmailSender`.
b3f0736
to
c8c3e01
Compare
c8c3e01
to
8fb7432
Compare
Quality Gate passedIssues Measures |
This feature aims at enabling magic link authentication through mails. The mail will then provide a deeplink for the correct application (app/shifty) on valid login and use refresh tokens to stay logged in.
This is only for Shifty at this point, since the implementation is missing for the app frontend. Once implemented in both places, we should do a soft roll-over of requiring users to update the app, possibly with a hard requirement at the beginning of the new semester.