Skip to content

Commit

Permalink
fix: #522 enable local accounts by default and show a message when th…
Browse files Browse the repository at this point in the history
…ere are no sign-in providers.
  • Loading branch information
ascott18 committed Jan 28, 2025
1 parent 673b8a6 commit e249f5f
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 4 deletions.
2 changes: 1 addition & 1 deletion docs/stacks/vue/TemplateBuilder.vue
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ const selections = ref([
"DarkMode",
"AuditLogs",
"UserPictures",
// "ExampleModel",
"LocalAuth" // https://github.com/IntelliTect/Coalesce/issues/522
]);
watch(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

<div>
<label asp-for="Username" class="form-label" autocomplete="username"></label>
<input asp-for="Username" class="form-control" autofocus required />
<input asp-for="Username" class="form-control" autofocus required />
</div>
<div>
<label asp-for="Password" class="form-label" autocomplete="current-password"></label>
Expand Down Expand Up @@ -53,11 +53,24 @@
<div class="d-grid gap-3">
@foreach (var provider in externalLogins)
{
<button type="submit" name="provider" value="@provider.Name" title="Log in with @provider.DisplayName" class="btn btn-outline-dark rounded-pill">
<button type="submit" name="provider" value="@provider.Name" title="Log in with @provider.DisplayName"
class="btn btn-outline-dark rounded-pill">
<img src="/@provider.Name-logo.svg" />
Sign in with @provider.DisplayName
</button>
}
</div>
</form>
}
}
@*#if (!LocalAuth) *@
@if (!externalLogins.Any())
{
<div class="alert alert-primary text-center" role="alert">
No external login providers have been configured, and local accounts were not added from the project template.
<br>
You will need to <a href="https://learn.microsoft.com/en-us/aspnet/core/security/authentication/social">
setup some other login provider
</a>.
</div>
}
@*#endif *@

0 comments on commit e249f5f

Please sign in to comment.