< Previous Challenge - Home - Next Challenge >
Right now your application on Azure is wide open for anyone to use. Your application allows you to add, edit and delete competitors. Let’s make sure only authenticated users can do this. If you try to perform one of these actions in your application, you’ll get some errors; you need to complete the feature!
The application has the code in place to authenticate users against Azure AD B2C, you just need to create an Azure AD B2C application, build the user journeys and policy and then set the right configuration values.
Azure AD B2C
application in the Azure portal.OpenIDConnect Account
(requires an AzureAD app registration in your AzureAD tenant).To complete this challenge successfully, you should be able to:
https
for the authentication redirects to work./signin-oidc
in your redirect URLversion: "3"
services:
rockpaperscissors-server:
build:
context: .
dockerfile: Dockerfile-Server
container_name: rockpaperscissors-server
environment:
...
"AzureAdB2C__Instance": "https://aadb2c-tenantname.b2clogin.com"
"AzureAdB2C__TenantId": "AADB2C-TENANTID-ID(A Guid)"
"AzureAdB2C__ClientId": "AADB2C-CLIENT-ID(A Guid)"
"AzureAdB2C__ClientSecret": "AADB2C-CLIENT-SECRET"
"AzureAdB2C__Domain": "AADB2C-TENANT(tenantname.onmicrosoft.com)"
"AzureAdB2C__SignUpSignInPolicyId": "AADB2C-policyname"
"ASPNETCORE_URLS": "https://+;http://+"
"ASPNETCORE_Kestrel__Certificates__Default__Password": ""
"ASPNETCORE_Kestrel__Certificates__Default__Path": "/https/aspnetapp.pfx"
ports:
- "80:80"
- "443:443"
volumes:
- ~/.aspnet/https:/https
...