Question: Different domains oauth
if I have both aaa.com and bbb.com pointing to the same website then i seem to run into a slight hiccup.
With local user it will work nicely as it simply checks username and password and verifies. But with oauth as far as i can tell (never worked much with it) it's bound to the domain which means that if I go and create an account on aaa.com and then later browse to bbb.com (both are same service) I cannot log in with my oauth there. I can at best create a new user (but not with same username because it's taken).
Is this purely a oauth issue or can i work around this?
Hmm, I think you might have to have a slightly custom provider so you can replace or override the user validation code and query with a filter of username + domain instead of just username. I don't see another way to do that off hand. Does that make sense?
I did that actually because I not only have aaa.com and bbb.com I also have tenants so in fact tenant 1 might have both aaa.com and bbb.com linked to him and tenant 2 might have onlu ccc.com for instance.
So i modified the project to take a tenant-name as well so I for instance can have the same username with both tenant 1 and tenant 2.
but my problem now lies within only oauth and tenant 1 where aaa.com and bbb.com cannot use the same oauth it seems. If I browse to aaa.com I get tenants 1 page and design. I then go on to create account with oauth. It asks me to give it a username so I do.
When I now go to bbb.com and click the oauth button (google) instead of logging me in like it should it asks me to make the connection anew and then to create a username again.
And I don't see where I can modify anything to fix this since it to me seems to be in oauth that it is bound to the domain you use (like aaa.com)
I do wonder if this is a problem with the OAuth interaction. I'm just not familiar enough with OAuth to know.