Sossenbinder
Sossenbinder
CC#
Created by Lounder on 12/20/2024 in #help
How terrible is this Result implementation?
But you could create an extension method on Result<T>, transforming it into an ActionResult<T>
15 replies
CC#
Created by Lounder on 12/20/2024 in #help
How terrible is this Result implementation?
There's a bunch of result implementations out there you can just use as well
15 replies
CC#
Created by Lounder on 12/20/2024 in #help
How terrible is this Result implementation?
Although I'm not sure when you would need an object as the Data opposed to the T itself
15 replies
CC#
Created by Lounder on 12/20/2024 in #help
How terrible is this Result implementation?
Second option definitely looks better
15 replies
CC#
Created by Lounder on 12/20/2024 in #help
How terrible is this Result implementation?
The first version is definitely not ideal, you have a shadowed property, and this would also be prone to boxing in case T is a value type
15 replies
CC#
Created by Connor on 12/11/2024 in #help
How to authenticate a chrome extension using blazor server
Oh, and chrome extensions can also access cookies of a page depending on the permission. So if you have an existing session somewhere, you could also reuse that cookie
10 replies
CC#
Created by Connor on 12/11/2024 in #help
How to authenticate a chrome extension using blazor server
It's a bit awkward overall because of the cookie and the embedded auth callback situation
10 replies
CC#
Created by Connor on 12/11/2024 in #help
How to authenticate a chrome extension using blazor server
So your chrome extension can implicitly hold the corresponding verifier to exchange for the access & refresh token together with the auth code
10 replies
CC#
Created by Connor on 12/11/2024 in #help
How to authenticate a chrome extension using blazor server
So the token you send to the extension is not the JWT & refresh token combination straight up, but only the authorization code
10 replies
CC#
Created by Connor on 12/11/2024 in #help
How to authenticate a chrome extension using blazor server
I could imagine that in this case openiddict could come in convenient, since you can basically do a PKCE-like flow
10 replies
CC#
Created by Connor on 12/11/2024 in #help
How to authenticate a chrome extension using blazor server
If you use a JWT it would probably mean you'd have to transfer the JWT in the redirect query string right away, which is not very neat
10 replies
CC#
Created by Connor on 12/11/2024 in #help
How to authenticate a chrome extension using blazor server
That's the convenient detail the browser usually handles for you when it comes to not exposing the token
10 replies
CC#
Created by Connor on 12/11/2024 in #help
How to authenticate a chrome extension using blazor server
I think some critical details would be that you can't use cookies IIRC since there's no way to store these in the background service
10 replies
CC#
Created by Connor on 12/11/2024 in #help
How to authenticate a chrome extension using blazor server
So your blazor app uses a regular asp net backend with identity for login? I think what might work is - Your chrome extension opens the web auth flow https://developer.chrome.com/docs/extensions/reference/api/identity#method-launchWebAuthFlow - The popup will be forwarded to your login page - Login page does it's thing, and in the end you'd probably redirect and therefore transfer the final token in the redirect which your chrome extension can then capture in the callback
10 replies