Comments (9)
Maybe it could help to have the "AddZitadelAuthentciatioN" for blazor apps.
from zitadel-net.
Hey @KillTrot
I honestly don't know. In a Blazor Server App it should be possible, since everything is handled by the Kestrel server. On the other hand, in a Blazor Webassembly App, I'm not really sure if it works.
What I found: Authenticate a WebAssembly App with the Authenticator Package, so it seems that it is possible. However, you don't need the Zitadel package for it.
from zitadel-net.
Hey @buehler
Thank you very much for you answer.
I was able to find out the problem, but I was not able to find a solution yet.
The class RemoteAuthenticationState expects the state in the token response to contain the property "returnUrl" which is missing with zitadel.
Other providers (KeyCloak, Auth0, Authentik, IdentityServer etc.) provide the returnUrl.
This is why it throws an exception when trying to convert the state to a RemoteAuthenticationState.
Do you think I should open an issue in the zitadel repository?
from zitadel-net.
I think this is more of a configuration issue. Do you have a demo-repository?
from zitadel-net.
I quickly created one
Have a look here: https://github.com/KillTrot/Zitadel-BlazorWasm
from zitadel-net.
So, I managed to get it working (for the Auth part at least). You need to add the following return Url in ZITADEL to your redirect urls: https://localhost:5443/authentication/login-callback
. Afterwards, the login & redirect works. However, after the redirect (when fetching the user profile), the following error appears:
Microsoft.AspNetCore.Components.WebAssembly.Rendering.WebAssemblyRenderer[100]
Unhandled exception rendering component: An exception occurred executing JS interop: The JSON value could not be converted to Microsoft.AspNetCore.Components.WebAssembly.Authentication.RemoteAuthenticationState.
from zitadel-net.
This is exactly the exception I'm currently fighting with.
I also created an issue on the Zitadel repository: zitadel/zitadel#5783
I think we can close this here, as it is not related with zitadel-net
from zitadel-net.
Alright :) I think overwriting the default remote state object could be a good idea. My guess is, that in the OIDC Spec, the state is an arbitrary field and not necessarily an object with the return url.
from zitadel-net.
Thanks very much for your invested time :)
from zitadel-net.
Related Issues (17)
- Zitadel.gRPC - Multi-target NetStandard 2.1 HOT 3
- The automated release is failing 🚨
- Add better gh-pages docs HOT 1
- Use the same ClaimTypes in all methods HOT 1
- Introspection endpoint fails with JWT profile HOT 6
- Roles not mapped to User HOT 3
- Upgrade BouncyCastle Package to latest .Net package
- Problem with Zitadel.Credentials.ServiceAccount.AuthenticateAsync and iat being in the future HOT 1
- [feat]: improve error messages for introspection
- Zitadel version is stuck
- UserService Function AddIDPLink Error HOT 2
- Problem when not using HTTPS HOT 5
- feat: Add ServiceAccount helper class for authentication HOT 1
- message.State is null or empty. HOT 2
- Dependency Dashboard
- feat: add lokal fake authentication to ease development HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from zitadel-net.