aguafrommars / maui.blazor.authentication Goto Github PK
View Code? Open in Web Editor NEWSimplify OIDC authentication for MAUI Blazor app
License: Apache License 2.0
Simplify OIDC authentication for MAUI Blazor app
License: Apache License 2.0
In my case i am using keycloak as the OIDC Server.
Keycloak requires me to send the id_token along with the logout URL.
In the web, i can use JSRuntime to access the session storage and retrieve this token.
Is there a service in this library that can provide me the tokens (access_token and id_token)?
Hello Olivier,
This is some excellent stuff with lots of details and complexities baked in but simplified.
And extra special congrats for the great work with both the samples. (This is where most people lack).
Just one question, I would like to pass the token with Grpc request or just need the access token to pass with SignalR request?
How do we get the token?
First I wanna thank you for this library, it seems to be a very convenient way to implement oidc into maui blazor apps.
Unfortunately I get this Error after a valid signin.
Error adding record: MissingEntitlement
at Microsoft.Maui.Storage.KeyChain.SetValueForKey(String value, String key, String service)
at Microsoft.Maui.Storage.SecureStorageImplementation.SetAsync(String key, String value, SecAccessible accessible)
at Microsoft.Maui.Storage.SecureStorageImplementation.PlatformSetAsync(String key, String data)
at Microsoft.Maui.Storage.SecureStorageImplementation.SetAsync(String key, String value)
at Aguacongas.AspNetCore.Components.Maui.Authentication.Oidc.Services.AuthenticationStore.SetAsync(String scope, AuthenticationEntity value)
at Aguacongas.AspNetCore.Components.Maui.Authentication.Oidc.Services.OidcAuthenticationService`1.<StoreLoginResultAsync>d__16[[Microsoft.AspNetCore.Components.WebAssembly.Authentication.RemoteAuthenticationState, Microsoft.AspNetCore.Components.WebAssembly.Authentication, Version=7.0.2.0, Culture=neutral, PublicKeyToken=adb9793829ddae60]].MoveNext()
at Aguacongas.AspNetCore.Components.Maui.Authentication.Oidc.Services.OidcAuthenticationService`1.<SignInAsync>d__14[[Microsoft.AspNetCore.Components.WebAssembly.Authentication.RemoteAuthenticationState, Microsoft.AspNetCore.Components.WebAssembly.Authentication, Version=7.0.2.0, Culture=neutral, PublicKeyToken=adb9793829ddae60]].MoveNext()
at Microsoft.AspNetCore.Components.WebAssembly.Authentication.RemoteAuthenticatorViewCore`1.<ProcessLogIn>d__85[[Microsoft.AspNetCore.Components.WebAssembly.Authentication.RemoteAuthenticationState, Microsoft.AspNetCore.Components.WebAssembly.Authentication, Version=7.0.2.0, Culture=neutral, PublicKeyToken=adb9793829ddae60]].MoveNext()
at Microsoft.AspNetCore.Components.WebAssembly.Authentication.RemoteAuthenticatorViewCore`1.<OnParametersSetAsync>d__84[[Microsoft.AspNetCore.Components.WebAssembly.Authentication.RemoteAuthenticationState, Microsoft.AspNetCore.Components.WebAssembly.Authentication, Version=7.0.2.0, Culture=neutral, PublicKeyToken=adb9793829ddae60]].MoveNext()
at Microsoft.AspNetCore.Components.ComponentBase.CallStateHasChangedOnAsyncCompletion(Task task)
at Microsoft.AspNetCore.Components.ComponentBase.RunInitAndSetParametersAsync()
at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task taskToHandle, ComponentState owningComponentState)
Either I missed it, or there is no part in the setup instructions about setting up the Keychain entitlements.
I tried to set them up, but i couldn't get around this error. Neither in my own solution, nor in the Example solution.
Any Ideas?
Best,
Marius
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.