<snip>
> Wow, what a pain this is.
> I succeeded in making it work but I have to do some more testing to be sure my solution is ok.
>
> I had to make a User for site B as well and then, the user is logged in, in site A and B.
> Off course, having the same user object in Site B defeats the whole purpose.
>
> I'm not sure I'm happy with the fact that you have to call authenticate before a call to login.
> In the login view of site B, i get the id of the user that is logged in.
> So i thought this would work:
> user = User.objects.using('central_users').get(pk=key)
> login(request, user)
>
> where 'central_users' is set in settings.py to link to the users database of site A.
> Off course, the above doesn't work because of the authenticate so you have to write a backend.
> No probs, you write the backend to get the users from 'central_users' and return that user.
> Simple enough.
> Nope, if you do that, the user is logged out of site A.
> I have only been able to solve this by creating a new user for site B.
>
> As I said, i'm going to test further but it has been a painful journey.
>
> Cheers,
> Benedict
>
I have to make a user object on site B to make the login work.
This is not what I was after.
Is it possible to get a user from site A, return that info to site B and login that user on
another site?
In my tests, I haven't succeeded in doing so.
Any info is appreciated,
Benedict
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
No comments:
Post a Comment