Skip to content

Commit

Permalink
published improved client sample
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasduft committed Aug 24, 2022
1 parent 1d4ac84 commit be082cd
Show file tree
Hide file tree
Showing 12 changed files with 41 additions and 22 deletions.
8 changes: 0 additions & 8 deletions samples/Server/Pages/Account/Login.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,6 @@
<input asp-for="Input.Password" />
<span asp-validation-for="Input.Password"></span>
</div>
<div class="form__group">
<div>
<label asp-for="Input.RememberMe">
<input asp-for="Input.RememberMe" />
Remember Me
</label>
</div>
</div>
<div>
<button type="submit">Log in</button>
</div>
Expand Down
6 changes: 2 additions & 4 deletions samples/Server/Pages/Account/Login.cshtml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,6 @@ public class InputModel
[Required(ErrorMessage = "Password required")]
[DataType(DataType.Password)]
public string Password { get; set; }

public bool RememberMe { get; set; }
}

public async Task OnGetAsync(string returnUrl = null)
Expand Down Expand Up @@ -71,7 +69,7 @@ public async Task<IActionResult> OnPostAsync(string returnUrl = null)
var result = await _signInManager.PasswordSignInAsync(
Input.Username,
Input.Password,
Input.RememberMe,
true,
lockoutOnFailure: true
);
if (result.Succeeded)
Expand All @@ -85,7 +83,7 @@ public async Task<IActionResult> OnPostAsync(string returnUrl = null)
return RedirectToPage("./LoginWith2fa", new
{
ReturnUrl = returnUrl,
Input.RememberMe
RememberMe = true
});
}
if (result.IsLockedOut)
Expand Down
31 changes: 30 additions & 1 deletion samples/Server/wwwroot/3rdpartylicenses.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ THE SOFTWARE.
@angular/common
MIT

@angular/compiler
MIT

@angular/core
MIT

Expand All @@ -41,6 +44,32 @@ MIT
@angular/router
MIT

@babel/runtime
MIT
MIT License

Copyright (c) 2014-present Sebastian McKenzie and other contributors

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.


angular-oauth2-oidc
MIT
Copyright (c) 2017 Manfred Steyer
Expand Down Expand Up @@ -308,7 +337,7 @@ zone.js
MIT
The MIT License

Copyright (c) 2010-2020 Google LLC. https://angular.io/license
Copyright (c) 2010-2022 Google LLC. https://angular.io/license

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
4 changes: 2 additions & 2 deletions samples/Server/wwwroot/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
<base href="/">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" type="image/x-icon" href="favicon.ico">
<style>*{margin:0;padding:0}body{font-family:sans-serif;height:100vh}@-webkit-keyframes borderscale{50%{box-shadow:0 0 0 2px #2c3e50}}@-webkit-keyframes fa-spin{0%{transform:rotate(0)}to{transform:rotate(359deg)}}</style><link rel="stylesheet" href="styles.d5f920a8ba8d52e2.css" media="print" onload="this.media='all'"><noscript><link rel="stylesheet" href="styles.d5f920a8ba8d52e2.css"></noscript></head>
<style>*{margin:0;padding:0}body{font-family:sans-serif;height:100vh}</style><link rel="stylesheet" href="styles.dcf05ab5a0fdd8cf.css" media="print" onload="this.media='all'"><noscript><link rel="stylesheet" href="styles.dcf05ab5a0fdd8cf.css"></noscript></head>
<body>
<tw-root></tw-root>
<script src="runtime.5eac2139ea957429.js" type="module"></script><script src="polyfills.767545bebe1de56c.js" type="module"></script><script src="main.ccf6086a2a38ccb4.js" type="module"></script>
<script src="runtime.b19f259a8d512131.js" type="module"></script><script src="polyfills.4368bceaff05ae75.js" type="module"></script><script src="main.03c5612c54e36602.js" type="module"></script>

</body></html>
1 change: 1 addition & 0 deletions samples/Server/wwwroot/main.03c5612c54e36602.js

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion samples/Server/wwwroot/main.ccf6086a2a38ccb4.js

This file was deleted.

1 change: 1 addition & 0 deletions samples/Server/wwwroot/polyfills.4368bceaff05ae75.js

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion samples/Server/wwwroot/polyfills.767545bebe1de56c.js

This file was deleted.

1 change: 0 additions & 1 deletion samples/Server/wwwroot/runtime.5eac2139ea957429.js

This file was deleted.

1 change: 1 addition & 0 deletions samples/Server/wwwroot/runtime.b19f259a8d512131.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 0 additions & 4 deletions samples/Server/wwwroot/styles.d5f920a8ba8d52e2.css

This file was deleted.

4 changes: 4 additions & 0 deletions samples/Server/wwwroot/styles.dcf05ab5a0fdd8cf.css

Large diffs are not rendered by default.

0 comments on commit be082cd

Please sign in to comment.