-
Notifications
You must be signed in to change notification settings - Fork 2
feat: add full OAuth2 flows and login UI #62
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
Merged
Merged
Changes from 1 commit
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
7f50a3e
feat: add first version of login UI
jeastham1993 b86caf7
feat: add OAuth 2 implementation
jeastham1993 07c4041
fix: remove redundant Bootstrap static assets
jeastham1993 349a3b7
chore: update auth docs
jeastham1993 b0bcd6b
feat: resolve integration test issues
jeastham1993 13f4e28
Delete .github/.DS_Store
jeastham1993 543f143
Delete .DS_Store
jeastham1993 82a2d23
chore: fix integrationt test issues
jeastham1993 803570d
chore: remove redundant integration test
jeastham1993 63a98af
Merge branch 'feat/add-login-ui' of github.com:DataDog/stickerlandia …
jeastham1993 9e79b68
chore: update docs for auth controller
jeastham1993 a42f981
chore: update integration tests to remove consent and HTML parsing
jeastham1993 63b2787
chore: cleanup code
jeastham1993 0798a43
chore: readd user updated event publish
jeastham1993 3681b8c
fix: resolve test issue
jeastham1993 66041d7
chore: update docs and endpoints
jeastham1993 998bfb6
feat: update login/register page paths
jeastham1993 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Binary file not shown.
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
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
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
34 changes: 34 additions & 0 deletions
34
...ent/src/Stickerlandia.UserManagement.Api/Areas/Identity/Pages/Shared/_LoginPartial.cshtml
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| @using Microsoft.AspNetCore.Identity | ||
| @using Stickerlandia.UserManagement.Agnostic | ||
| @inject SignInManager<PostgresUserAccount> SignInManager | ||
| @addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers | ||
|
|
||
| @{ | ||
| var returnUrl = "/"; | ||
| if (Context.Request.Query.TryGetValue("returnUrl", out var existingUrl)) { | ||
| returnUrl = existingUrl; | ||
| } | ||
| } | ||
|
|
||
| <ul class="navbar-nav"> | ||
| @if (SignInManager.IsSignedIn(User)) | ||
| { | ||
| <li class="nav-item"> | ||
| <a class="nav-link text-dark" asp-area="Identity" asp-page="/Account/Manage/Index" title="Manage">Hello @User.Identity!.Name!</a> | ||
| </li> | ||
| <li class="nav-item"> | ||
| <form class="form-inline" asp-area="Identity" asp-page="/Account/Logout" asp-route-returnUrl="/" method="post"> | ||
| <button type="submit" class="nav-link btn btn-link text-dark">Logout</button> | ||
| </form> | ||
| </li> | ||
| } | ||
| else | ||
| { | ||
| <li class="nav-item"> | ||
| <a class="nav-link text-dark" asp-area="Identity" asp-page="/Account/Register" asp-route-returnUrl="@returnUrl">Register</a> | ||
| </li> | ||
| <li class="nav-item"> | ||
| <a class="nav-link text-dark" asp-area="Identity" asp-page="/Account/Login" asp-route-returnUrl="@returnUrl">Login</a> | ||
| </li> | ||
| } | ||
| </ul> |
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.