https://github.com/christophwille/blazor-forge-3legged-implicit
Blazor Web Assembly application doing 3legged implicit authorization against Autodesk Forge
https://github.com/christophwille/blazor-forge-3legged-implicit
blazor blazor-webassembly csharp dotnet-core oauth2
Last synced: 3 months ago
JSON representation
Blazor Web Assembly application doing 3legged implicit authorization against Autodesk Forge
- Host: GitHub
- URL: https://github.com/christophwille/blazor-forge-3legged-implicit
- Owner: christophwille
- License: mit
- Created: 2021-02-24T15:17:59.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2021-02-24T15:27:59.000Z (over 5 years ago)
- Last Synced: 2025-02-14T08:33:15.520Z (over 1 year ago)
- Topics: blazor, blazor-webassembly, csharp, dotnet-core, oauth2
- Language: C#
- Homepage:
- Size: 434 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Blazor Web Assembly accessing Autodesk Forge API
Set your client id in [Index.razor.cs](https://github.com/christophwille/blazor-forge-3legged-implicit/blob/3dad03ea989ad8fca4819543c65427eb11b36ace/BlazorImplicitGrantForge/Pages/Index.razor.cs#L13) (no configuration
has been implemented for this proof of concept).
If unauthorized, Index will show a link to login at Autodesk Forge. Callbacks happen in
[OAuthCallback.razor.cs](https://github.com/christophwille/blazor-forge-3legged-implicit/blob/3dad03ea989ad8fca4819543c65427eb11b36ace/BlazorImplicitGrantForge/Pages/OAuthCallback.razor.cs), which itself redirects back to Index and then shows the user profile JSON (the URL fragment parsing in OAuthCallback is very brittle).

Note that using the .NET API Client 1.9 from Autodesk does not work - see the implementation of [GetNameFromProfileAsync](https://github.com/christophwille/blazor-forge-3legged-implicit/blob/3dad03ea989ad8fca4819543c65427eb11b36ace/BlazorImplicitGrantForge/Pages/Index.razor.cs#L47) for the detailed textual error message.
