question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How to configure UseJwtBearerAuthentication on multiple application to use same token for authentication?

See original GitHub issue

I am following this example - http://capesean.co.za/blog/asp-net-5-jwt-tokens/.

Now I have App1 which is giving token through /Connect/Token/ endpoint (in App1). I will call this App1 endpoint and get token from App2 (i enabled CORS on App1). Now I want to use the same token to authenticate the call for Web API which is present in App2.

So basically I want to use Token (which I get from App1) in App2 Web Api through Authorize attribute. Please guide me on how to do that?

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
kevinchaletcommented, May 13, 2016

The resource parameter supports multiple endpoints, just separate them with spaces and you’ll get an access token targeting multiple audiences (= APIs)

e.g resource=http://app1.domain.com/ http://app2.domain.com/

0reactions
a-a-kcommented, Nov 11, 2021

Thanks @PinpointTownes, it worked. Thanks for your help and support.

Could you provide your whole startup? I’m stuck on this

Read more comments on GitHub >

github_iconTop Results From Across the Web

c# - Use multiple JWT Bearer Authentication
I can have multiple issuers and audiences, but I can't set several Authorities. ... AFAIK you may add any number of properties to...
Read more >
SPA using token to call another API
So I configure my API like this: app.UseJwtBearerAuthentication( new ... method to get tokens to use for multiple APIs from our SPA.
Read more >
Securing a Web API using multiple token servers
This article shows how a single secure Web API could be used together with multiple secure token servers. The API uses JWT Bearer...
Read more >
JWT Validation and Authorization in ASP.NET Core
In this post, I'm going to cover the other end of token use on ASP.NET Core – how to validate JWT tokens and...
Read more >
Supporting JWT and Cookie based Auth scheme in one . ...
In this tutorial, I am going to show how can we achieve both authentication in same webapi project. Let's start by making changes...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found