Service authorisation using AllAuth Social for already logged in users, i.e. request.user.

32 views
Skip to first unread message

Nick Lo

unread,
Nov 19, 2018, 11:54:40 PM11/19/18
to django-allauth
Odd one I realise but has anyone used the functionality of AllAuth Social for already logged in users?

I'm using AllAuth it in a project that connects users up to other providers to use their APIs. In this instance it's an OAuth1 based service so I made use of AllAuth and hacked together a custom provider for the authorisation part so I could quickly start work on a client component for their API. It worked for my temporary needs but of course expects to be creating a new user rather than just authorising an existing one. I had planned to rework the authorisation component but it may be useful for the future to keep it and allow new users to join and authorise against these providers so my question is; has anyone used it in this way?

In theory it'd just need some kind of - if user.is_authenticated() - skip but I thought I'd see if anyone had tried this and had recommendations before digging too deep into the layers of code in the social part of AllAuth.

Cheers, Nick
Reply all
Reply to author
Forward
0 new messages