Skip to content
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

Open
wants to merge 34 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 23 commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
432f32e
Add Token entity and sketch controller
duckth Sep 3, 2024
a6738f2
Add logic for magic link login and refresh token
duckth Sep 17, 2024
0cbd67b
Fix some errors
duckth Sep 24, 2024
6cac403
Migrations and initial refresh tokens
A-Guldborg Oct 1, 2024
2dffbe5
Handle logintypes
A-Guldborg Oct 8, 2024
f42d6ea
Move things to correct services
A-Guldborg Oct 22, 2024
a793751
Change controller to use query parameters
duckth Oct 22, 2024
4f38d77
Changes required for shifty
A-Guldborg Nov 5, 2024
e85e55b
Revert startup.cs
duckth Nov 5, 2024
e56f4f7
Always send refreshtoken
A-Guldborg Nov 5, 2024
55ce8a9
Update magic link mail
duckth Nov 5, 2024
24c978c
Fix missing curly?
duckth Nov 5, 2024
58a658c
Simplify auth flow
duckth Nov 5, 2024
4acafe8
Resolve SonarCloud issues
A-Guldborg Nov 12, 2024
2a2fda1
Fix tests for new constructors
A-Guldborg Nov 12, 2024
494472a
Use new email sender
duckth Nov 12, 2024
689b2f5
Exclude generated emails from sonar analysis
A-Guldborg Nov 15, 2024
6b6cd10
Hashing tokens before saving to DB
A-Guldborg Nov 15, 2024
61e3834
Try remove exclusions to use rules defined in UI
duckth Nov 19, 2024
67f94d1
Merge branch 'main' into feature/magic-link-login
A-Guldborg Nov 19, 2024
66cad30
Service tests
A-Guldborg Nov 19, 2024
874dada
Merge branch 'main' into feature/magic-link-login
A-Guldborg Nov 19, 2024
9134cb4
Remove unused imports
A-Guldborg Nov 19, 2024
c60bbf7
Fix asynchronity of GenerateMagicLink
duckth Nov 26, 2024
c175b82
Fix data annotations and examples
A-Guldborg Nov 26, 2024
3cac5a8
Add TokenHash index
A-Guldborg Nov 26, 2024
01bf40b
Renaming
A-Guldborg Nov 26, 2024
df84c52
Include shifty url in deployment appsettings
duckth Dec 3, 2024
6f79570
Use builders for token and account v2 service tests (#304)
A-Guldborg Dec 3, 2024
b2faba9
Merge branch 'main' into feature/magic-link-login
A-Guldborg Dec 3, 2024
142119c
Use correct logger for email service
A-Guldborg Dec 3, 2024
019b4b0
Allow mocking services in integration tests
A-Guldborg Dec 3, 2024
8fb7432
Fix email service logger
A-Guldborg Dec 3, 2024
8c6be60
TokenServiceTests with initial and assertion contexts
A-Guldborg Dec 3, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions .github/workflows/sonarcloud.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
uses: actions/setup-java@v4
with:
java-version: 17
distribution: 'zulu'
distribution: "zulu"
- uses: actions/checkout@v4
with:
fetch-depth: 0
Expand Down Expand Up @@ -43,7 +43,7 @@ jobs:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
shell: powershell
run: |
.\.sonar\scanner\dotnet-sonarscanner begin /k:"AnalogIO_analog-core" /o:"analogio" /d:sonar.login="${{ secrets.SONAR_TOKEN }}" /d:sonar.host.url="https://sonarcloud.io" /d:sonar.cs.opencover.reportsPaths="coverageunit.xml,coverageintegration.xml" /d:sonar.exclusions="CoffeeCard.Library/Migrations/*"
.\.sonar\scanner\dotnet-sonarscanner begin /k:"AnalogIO_analog-core" /o:"analogio" /d:sonar.login="${{ secrets.SONAR_TOKEN }}" /d:sonar.host.url="https://sonarcloud.io" /d:sonar.cs.opencover.reportsPaths="coverageunit.xml,coverageintegration.xml"

dotnet tool install --global coverlet.console

Expand All @@ -52,4 +52,5 @@ jobs:
coverlet ./coffeecard/CoffeeCard.Tests.Unit/bin/Debug/net8.0/CoffeeCard.Tests.Unit.dll --target "dotnet" --targetargs "test --no-build coffeecard/CoffeeCard.Tests.Unit" -f=opencover -o="coverageunit.xml"
coverlet ./coffeecard/CoffeeCard.Tests.Integration/bin/Debug/net8.0/CoffeeCard.Tests.Integration.dll --target "dotnet" --targetargs "test --no-build coffeecard/CoffeeCard.Tests.Integration" -f=opencover -o="coverageintegration.xml"

.\.sonar\scanner\dotnet-sonarscanner end /d:sonar.login="${{ secrets.SONAR_TOKEN }}"
.\.sonar\scanner\dotnet-sonarscanner end /d:sonar.login="${{ secrets.SONAR_TOKEN }}"

4 changes: 4 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,9 @@
"yaml.schemas": {
"https://json.schemastore.org/github-workflow.json": "file:///c%3A/code/private/analogio/analog-core/.github/actions/deploy.yml",
"https://json.schemastore.org/github-action.json": "file:///c%3A/code/private/analogio/analog-core/.github/actions/core-sonarcloud.yml"
},
"sonarlint.connectedMode.project": {
"connectionId": "Analog",
"projectKey": "AnalogIO_analog-core"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ public class EnvironmentSettings : IValidatable

[Required] public string DeploymentUrl { get; set; }

[Required] public string ShiftyUrl { get; set; }
Copy link
Member

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

Copy link
Contributor Author

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 :)

Copy link
Member

Choose a reason for hiding this comment

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

Yes


public void Validate()
{
Validator.ValidateObject(this, new ValidationContext(this), true);
Expand Down
Loading
Loading