Skip to content

Commit ba94a1c

Browse files
committed
Do not use Auth0 by default. Replaced default assets and text
1 parent c150349 commit ba94a1c

File tree

5 files changed

+18
-4
lines changed

5 files changed

+18
-4
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ riderModule.iml
55
/_ReSharper.Caches/
66

77
appsettings.Development.json
8+
appsettings.Production.json
89

910
*.[Pp]ublish.xml
1011
*.azurePubxml

LinkDotNet.Blog.Web/Startup.cs

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
using Blazored.LocalStorage;
22
using Blazored.Toast;
33
using LinkDotNet.Blog.Web.Authentication.Auth0;
4+
using LinkDotNet.Blog.Web.Authentication.Dummy;
45
using LinkDotNet.Blog.Web.RegistrationExtensions;
56
using Microsoft.AspNetCore.Builder;
67
using Microsoft.AspNetCore.Hosting;
@@ -12,8 +13,11 @@ namespace LinkDotNet.Blog.Web
1213
{
1314
public class Startup
1415
{
15-
public Startup(IConfiguration configuration)
16+
private readonly IWebHostEnvironment environment;
17+
18+
public Startup(IWebHostEnvironment env, IConfiguration configuration)
1619
{
20+
environment = env;
1721
Configuration = configuration;
1822
}
1923

@@ -37,10 +41,19 @@ public void ConfigureServices(IServiceCollection services)
3741
*/
3842

3943
// Here you can setup up your identity provider
40-
services.UseAuth0Authentication(Configuration);
44+
if (environment.IsDevelopment())
45+
{
46+
services.UseDummyAuthentication();
47+
}
48+
else
49+
{
50+
services.UseAuth0Authentication(Configuration);
51+
}
52+
4153
/****************
4254
* Possible authentication mechanism:
4355
* services.UseDummyAuthentication();
56+
* services.UseAuth0Authentication();
4457
*/
4558

4659
services.AddBlazoredToast();

LinkDotNet.Blog.Web/appsettings.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@
77
}
88
},
99
"AllowedHosts": "*",
10-
"BlogName": "linkdotnet",
10+
"BlogName": "Blogname",
1111
"GithubAccountUrl": "",
1212
"LinkedInAccountUrl": "",
1313
"Introduction": {
14-
"Description": "Hey, my name is **Steven**. I am a **.NET Developer** based in Zurich, Switzerland. This is my small blog, which I wrote completely in Blazor. If you want to know more about me just check out my LinkedIn or Github.\nAlso this blogsoftware is open source on [Github](https://github.com/linkdotnet/blog)",
14+
"Description": "A small introduction to your **blog**. Can be in markdown",
1515
"BackgroundUrl": "assets/profile-background.webp",
1616
"ProfilePictureUrl": "assets/profile-picture.webp"
1717
},
Binary file not shown.
Binary file not shown.

0 commit comments

Comments
 (0)