{"id":21374154,"url":"https://github.com/gimly/netcoreangularazureb2cmsal","last_synced_at":"2025-07-13T08:32:41.355Z","repository":{"id":145277413,"uuid":"107422609","full_name":"Gimly/NetCoreAngularAzureB2CMsal","owner":"Gimly","description":"This is the dotnet core angular default template with an addition of authentication with the help of Azure AD B2C and msal.js","archived":false,"fork":false,"pushed_at":"2017-10-31T15:17:26.000Z","size":200,"stargazers_count":12,"open_issues_count":2,"forks_count":4,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-04-28T03:46:57.840Z","etag":null,"topics":["angular","azure","azure-ad-b2c","msal","netcore"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Gimly.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2017-10-18T14:51:09.000Z","updated_at":"2021-07-29T21:12:16.000Z","dependencies_parsed_at":null,"dependency_job_id":"a8f0db7d-c3a8-45b2-b443-9f3e84624491","html_url":"https://github.com/Gimly/NetCoreAngularAzureB2CMsal","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Gimly%2FNetCoreAngularAzureB2CMsal","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Gimly%2FNetCoreAngularAzureB2CMsal/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Gimly%2FNetCoreAngularAzureB2CMsal/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Gimly%2FNetCoreAngularAzureB2CMsal/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Gimly","download_url":"https://codeload.github.com/Gimly/NetCoreAngularAzureB2CMsal/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225868314,"owners_count":17537007,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["angular","azure","azure-ad-b2c","msal","netcore"],"created_at":"2024-11-22T08:29:50.860Z","updated_at":"2024-11-22T08:30:22.614Z","avatar_url":"https://github.com/Gimly.png","language":"TypeScript","readme":"# Angular .Net Core startup template with Authentication through Azure AD B2C\nThis is the dotnet core angular default template with an addition of authentication with the help of Azure AD B2C and msal.js\n\n## Setting up\nFirst, you'll need to download the source code using git.\n```Bash\ngit clone https://github.com/Gimly/NetCoreAngularAzureB2CMsal.git\n```\nThen, go to the folder where the code has been loaded and restore both Nuget and NPM packages\n```Bash\ncd NetCoreAngularAzureB2CMsal\ndotnet restore\nnpm install\n```\nThen, open the source code and go to `~/ClientApp/app/environments` and update the `environment.ts` file to match your own Azure AD B2C subcription.\n```TypeScript\nexport const environment = {\n  production: false,\n  tenant: 'fabrikamb2c.onmicrosoft.com', // The name of your Azure AD B2C Tenant\n  clientID: 'e760cab2-b9a1-4c0d-86fb-ff7084abd902', // The application ID\n  signUpSignInPolicy: 'b2c_1_susi', // The name of the Sign-up or sign-in policy\n  b2cScopes: ['https://fabrikamb2c.onmicrosoft.com/demoapi/demo.read'], // A scope that you will setup in the Application \n  webApi: 'https://fabrikamb2chello.azurewebsites.net/hello' // URL of a web api\n};\n```\nYou'll also need to change the .Net Core API side's by changing the `JWT` property in the `appsettings.json` file.  As an alternative, you can right click the project and select `Manage User Secrets`.  This prevent you from commiting your tenant configuration to Git unless so desired.\n```json\n\"Jwt\": {\n    \"Audience\": \"25eef6e4-c905-4a07-8eb4-0d08d5df8b3f\",\n    \"Policy\": \"b2c_1_susi\",\n    \"Tenant\": \"fabrikamb2c\"\n}\n\n```\n\nDon't forget to add the URL and port on which you'll be running the sample in the application properties as a Reply URL, otherwise it won't work.\n\nAlternatively, you can also keep the settings and try to connect with the fabrikamb2c tenant, just make sure that you run the app on port 6420 if you want to do this.\nTo do this, set the `ASPNETCORE_URLS` environment variable to `\"http://localhost:6420\"`. If you're using PowerShell, use this command:\n```PowerShell\n$env:ASPNETCORE_URLS=\"http://localhost:6420\"\n```\n\n## Running the sample\nBefore you run the sample locally, make sure you're running it in Development mode, otherwise it might not correctly bootstrap webpack.\n```PowerShell\n$Env:ASPNETCORE_ENVIRONMENT = \"Development\"\n```\n\nTo run the sample, simply call\n```Bash\ndotnet run\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgimly%2Fnetcoreangularazureb2cmsal","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgimly%2Fnetcoreangularazureb2cmsal","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgimly%2Fnetcoreangularazureb2cmsal/lists"}