Git Product home page Git Product logo

Comments (4)

Sen-Gupta avatar Sen-Gupta commented on August 20, 2024

I have hit this issue as well. Blazor WASM hosted, .Net 7.

We have a blazor hosted app, on www.mysite.com
The client connects to a hosted signalr application, signalr.mysite.com.

The client needs to connect SignalR client and it needs access token to build the connection.

We are getting IAccessTokerProvider as null in Dependency Injection.

hubConnection = new HubConnectionBuilder()
.WithUrl(NavigationManager.ToAbsoluteUri("/messageshub"), options =>
{
options.AccessTokenProvider = async () =>
{
var accessTokenResult = await tokenProvider.RequestAccessToken();
accessTokenResult.TryGetToken(out var accessToken);
return accessToken.Value;
};
})
.Build();

Is there a way, we can get token while using Bff?

from bff.

Sen-Gupta avatar Sen-Gupta commented on August 20, 2024

Does this help?

https://github.com/dotnet/aspnetcore/blob/main/src/Components/WebAssembly/WebAssembly.Authentication/src/WebAssemblyAuthenticationServiceCollectionExtensions.cs#L38-L57

from bff.

leastprivilege avatar leastprivilege commented on August 20, 2024

Two things come to mind

  • token exchange
  • getting audience constrained tokens if resource isolation is being used

from bff.

brockallen avatar brockallen commented on August 20, 2024

Two things come to mind
token exchange
getting audience constrained tokens if resource isolation is being used

Hmm, and would DPoP need to be a concern here? Looking at the code, this would not work today it seems. So we can release this as-is now, and then make DPoP work down the road, or add it now.

from bff.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.