beccamc / SpeciesWeb

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Species Web

A platform for researchers & scientists filled with data & statistics on the worlds biodiversity.

Development

Prereqs

Local development

To run the project. Start the Docker container via the CLI or within Visual Studio. (2019 or higher) It will open up a website at https://localhost:49159/.

Azure AD B2C Authentication Setup

This project uses Azure Active Directory B2C Authentication. Azure AD B2C gives us the security of Azure auth, with the ability for external customers to sign in with their own credentials (email or social accounts). See more info here.

To transition this to CBD's azure account, CBD will need to create a B2C tenant and application.

  1. Create new B2C tenant. Microsoft tutorial here
    • Note: If you see a resource provider error, you may need to register the Microsoft.AzureActiveDirectory resource provider - instructions.
  2. Register your web app. Microsoft tutorial here
  3. Create a sign in sign up (recommended) user flow. Call the flow "signupsignin". Microsoft tutorial here
  4. Edit Blazor project appsettings.json to point to the new values. Go to https://portal.azure.com/#blade/Microsoft_AAD_B2CAdmin/TenantManagementMenuBlade/overview to find the correct values.

"AzureAdB2C": { "Instance": "https://your-domain-name.b2clogin.com", "Domain": "your-domain-name.onmicrosoft.com", <- Look at Domain Name "ClientId": "Application-(client)-ID", <- Go to App Registration, your app, Application (client) ID
"CallbackPath": "/signin-oidc", "SignedOutCallbackPath": "/signout", "SignUpSignInPolicyId": "B2C_1_signupsignin", <- If you called your user flow something, go to User Flow to find. "ResetPasswordPolicyId": "", "EditProfilePolicyId": "" },

Additional resources: If you prefer a video explanation, use this video tutorial walkthrough instead of the above instructions.

Here is a blog post that gives the same instructions, just more context around what the Azure terms mean.

About


Languages

Language:HTML 59.7%Language:C# 25.0%Language:CSS 12.9%Language:Dockerfile 2.3%