-
-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding external identity provider #31
Comments
What asp.net core version are you using, 1, 1.1 or 2.0? |
2.0
Op 21 jan. 2018 13:58 schreef "Darrell" <[email protected]>:
… What asp.net core version are you using, 1, 1.1 or 2.0?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#31 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AMOzJpBaIGv2O2DlztygAcNWg9PxwxKRks5tMzSQgaJpZM4RlwSu>
.
|
Are you adding Mvc in the tenant container also? (And usemvc in tenant middleware pipeline?) |
Failing that, if you have time to point me to a repro that would really help. |
Adding MVC to the tenant container and then using it in the tenant's pipeline doesn't work for me. I'm probably missing something here. See the startup below (without auth). It gives an exception when adding MVC to the pipeline: required services not found.
|
Hmm cant see anything obvious. I'll try and get a better sample up and running with mvc, cookie auth and asp.net core 2.0 but it may not be for a few days or so! |
That would be great.
I have an update: The supplied MVC example in the Dotnettency source (using
ASP.NET Core 1) also doesn't work.
When I add:
tenantServices.AddScoped<IActionContextAccessor, ActionContextAccessor>();
It starts up successfully but it can't find any pages (404 on every
request)
With kind regards/ Met vriendelijke groeten
Roland Guijt
Microsoft MVP
Microsoft MCT
Pluralsight author
rolandguijt.com
2018-01-23 1:57 GMT+01:00 Darrell <[email protected]>:
… Hmm cant see anything obvious. I'll try and get a better sample up and
running with mvc, cookie auth and asp.net core 2.0 but it may not be for
a few days or so!
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#31 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AMOzJhQ-0X0yk3QaY0U339Ia6aSJTE6wks5tNS5egaJpZM4RlwSu>
.
|
Any progress?
With kind regards/ Met vriendelijke groeten
Roland Guijt
Microsoft MVP
Microsoft MCT
Pluralsight author
rolandguijt.com
2018-01-23 14:02 GMT+01:00 Roland Guijt <[email protected]>:
… That would be great.
I have an update: The supplied MVC example in the Dotnettency source
(using ASP.NET Core 1) also doesn't work.
When I add:
tenantServices.AddScoped<IActionContextAccessor,
ActionContextAccessor>();
It starts up successfully but it can't find any pages (404 on every
request)
With kind regards/ Met vriendelijke groeten
Roland Guijt
Microsoft MVP
Microsoft MCT
Pluralsight author
rolandguijt.com
2018-01-23 1:57 GMT+01:00 Darrell ***@***.***>:
> Hmm cant see anything obvious. I'll try and get a better sample up and
> running with mvc, cookie auth and asp.net core 2.0 but it may not be for
> a few days or so!
>
> —
> You are receiving this because you authored the thread.
> Reply to this email directly, view it on GitHub
> <#31 (comment)>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/AMOzJhQ-0X0yk3QaY0U339Ia6aSJTE6wks5tNS5egaJpZM4RlwSu>
> .
>
|
Sorry, I was making progress and then nuget.org crapped up the other night and halted me. Have been super busy since but I will get back on this hopefully this week/end |
Is there any progress being made on this? |
It's next on my agenda.. Have been spread a bit thin working on other projects with a higher priority. |
Thanks |
This issue is blocking us from using dotnettency in our project. Can you give us some tips on where to look at? |
@amalabey A lot of stuff changed in asp.net core 2.0 to do with authentication and identity. I have some very basic samples for asp.net core 2.0 here which may help: https://github.com/dazinator/Dotnettency.Samples/tree/aspnetcore20/src However if you are wanting to use this for an asp.net core 2.0 project right now, then I am afraid it might be a little premature - I am hoping to find some more time to work on the project but it hasn't happened yet! |
Thanks for your quick response! I am trying to develop a multi-tenant app that supports multiple logical tenants identified by the subdomain in the url. Each tenant has its own database. The application should support yammer (and other providers too) but the yammer options (clientid, secret) are different for each tenant. So, need to be able to specify different yammer app settings for each tenant. Below is what I tried (with version 1.3.2).
Btw, you've done a great job. I am still getting myself familiarize with your work. Happy to contribute in the future. |
Here's a sample with the issue reproduced. Note that I am using 1.3.2 with ASP.NET Core 2 here. |
Is there any progress being made on this? This issue is blocking me from using dotnettency in my project. Can you give some tips on where to look at? |
Just about to look at this now using the sample that @amalabey provided. Like most of us, I don't get much time to spare these days, so If you are having an issue what really helps is if you can provide a repro / sample showing the problem and a quick explaination and I'll do my best to turn it around as quick as possible. By the way I have just added a couple more asp.net core 2.0 - EF Core samples showing two approaches to multitenancy and efcore:
You can find those samples here: https://github.com/dazinator/Dotnettency.Samples/tree/aspnetcore20/src |
@dazinator thanks for your answer. Could you please take a look on this repo https://github.com/amalabey/Dotnettency.Sample.Core2Auth/tree/master/src/Sample.Core2Auth |
I will begin looking at MVC per tenant container issue this evening. |
So for some reason, when When working at the root container level, I am not an expert with structure map and it looks complicated. I don't expect this to be turned round very quickly i'm afraid, unless someone can lend a hand. It's perhaps something I am doing wrong with sturcture map, or perhaps its a bug in My next plan of attack is to create a replication test with structure map - basically to proof if there is an issue with |
An update on this. https://github.com/dazinator/Dotnettency.Samples/tree/aspnetcore20/src/Sample.Authentication This took a while because whilst putting it together I had to get to the bottom of a few issues and find workarounds.
Please can you you let me know if this helps address your scenarios now - if not, what would you like to see. Thanks! |
Darrell,
This is great news! It seems to be exactly what I need. I'll try it out in
one of my projects and I'll let you know how it went.
Thanks a lot!
Op di 28 aug. 2018 om 15:45 schreef Darrell <[email protected]>:
… An update on this.
I have a new sample showing how Authentication can be configured for
different tenants (I'm using cookie authentication)
https://github.com/dazinator/Dotnettency.Samples/tree/aspnetcore20/src/Sample.Authentication
This took a while because whilst putting it together I had to get to the
bottom of a few issues and find workarounds.
1.
I raised an issue with StructureMap which is still currently
unresolved: structuremap/StructureMap.Microsoft.DependencyInjection#43
<structuremap/StructureMap.Microsoft.DependencyInjection#43>
2.
I have published Dotnettency.Container.Autofac package. The sample
above uses this instead of structuremap, because I was able to get Autofac
working.
Please can you you let me know if this helps address your scenarios now -
if not, what would you like to see. Thanks!
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#31 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AMOzJpc6iScXL1I0WcUw2iRDgSneBalaks5uVUlvgaJpZM4RlwSu>
.
|
@RolandGuijt - thank you. It's a very basic sample, not using many MVC features or anything but still.. I haven't actually tried configuring MVC or Razor differently per tenant, they all have the same configuration in the sample. But I am assuming you could do stuff like.. Configure one tenant to pick up Razor pages from one additional folder, or include additional compilation references, tag helpers, application parts etc. I am hoping this might enable a few more interesting mvc configuration scenarios. |
I will close this for now, we can reopen new issue if there is any feedback. |
I'm using 1.40 latest build.
I'm adding external identity providers to the tenant specific container (for example AddGoogle, AddOpenIdConnect).
When I (in a MVC controller) get the list of configured providers using an IAuthenticationSchemeProvider instance it seems nothing is configured.
Is there something special I should do?
The text was updated successfully, but these errors were encountered: