{"id":18296538,"url":"https://github.com/shadynagy/b2c-blazor-wasm-31","last_synced_at":"2026-05-04T11:37:00.925Z","repository":{"id":119851030,"uuid":"303236923","full_name":"ShadyNagy/b2c-blazor-wasm-31","owner":"ShadyNagy","description":"Secure an ASP.NET Core Blazor WebAssembly hosted app with Azure Active Directory B2C (Without implicit grant).","archived":false,"fork":false,"pushed_at":"2020-10-13T11:26:24.000Z","size":37,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-12-22T09:56:11.429Z","etag":null,"topics":["azure","azure-b2c","b2c","blazor","blazor-client","blazor-client-side","blazor-wasm","blazor-webassembly","implicit","microsoft","microsoft-azure","msal","msal-browser","msal-library","netcore","netcore31","netstandard","netstandard21","wasm","webassembly"],"latest_commit_sha":null,"homepage":"","language":null,"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/ShadyNagy.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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-10-12T00:15:11.000Z","updated_at":"2021-03-31T01:22:55.000Z","dependencies_parsed_at":"2023-06-03T09:15:46.084Z","dependency_job_id":null,"html_url":"https://github.com/ShadyNagy/b2c-blazor-wasm-31","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ShadyNagy/b2c-blazor-wasm-31","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ShadyNagy%2Fb2c-blazor-wasm-31","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ShadyNagy%2Fb2c-blazor-wasm-31/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ShadyNagy%2Fb2c-blazor-wasm-31/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ShadyNagy%2Fb2c-blazor-wasm-31/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ShadyNagy","download_url":"https://codeload.github.com/ShadyNagy/b2c-blazor-wasm-31/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ShadyNagy%2Fb2c-blazor-wasm-31/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32606228,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-04T10:08:07.713Z","status":"ssl_error","status_checked_at":"2026-05-04T10:08:02.005Z","response_time":58,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["azure","azure-b2c","b2c","blazor","blazor-client","blazor-client-side","blazor-wasm","blazor-webassembly","implicit","microsoft","microsoft-azure","msal","msal-browser","msal-library","netcore","netcore31","netstandard","netstandard21","wasm","webassembly"],"created_at":"2024-11-05T14:41:36.187Z","updated_at":"2026-05-04T11:37:00.881Z","avatar_url":"https://github.com/ShadyNagy.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Azure B2C Blazor WASM Working with 3.1\n\n### Secure an ASP.NET Core Blazor WebAssembly hosted app with Azure Active Directory B2C\n### Azure B2C not working in Blazor WASM (netstandard2.1) without the implicit grant so that is the solution\n\n1- Create the app [Microsoft Documentation](https://docs.microsoft.com/en-us/aspnet/core/blazor/security/webassembly/hosted-with-azure-active-directory-b2c?view=aspnetcore-3.1)\n\n2- Copy file AuthenticationService.js from src folder to your Blazor WASM project (B2CWasm.Client) in wwwroot folder.\n\n3- Change index.html in wwwroot folder from\n```html\n\u003cscript src=\"_content/Microsoft.Authentication.WebAssembly.Msal/AuthenticationService.js\"\u003e\u003c/script\u003e\n```\nto\n```html\n\u003cscript src=\"AuthenticationService.js\"\u003e\u003c/script\u003e\n```\n\n4- add this package to server\n```xml\n\u003cPackageReference Include=\"Microsoft.Identity.Web\" Version=\"1.1.0\" /\u003e\n```\n5- in WeatherForecastController \n```csharp\n...\nusing Microsoft.Identity.Web.Resource;\n ...\n\npublic class WeatherForecastController : ControllerBase\n{\n  ...\n  static readonly string[] scopeRequiredByApi = new string[] { \"your scop name\" };\n  ...\n  [HttpGet]\n  public IEnumerable\u003cWeatherForecast\u003e Get()\n  {\n    HttpContext.VerifyUserHasAnyAcceptedScope(scopeRequiredByApi);\n\n    ...\n  }\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshadynagy%2Fb2c-blazor-wasm-31","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshadynagy%2Fb2c-blazor-wasm-31","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshadynagy%2Fb2c-blazor-wasm-31/lists"}