1

I'm using django allauth.

All my users should have access to an url that is generated dynamically. Ex: www.example.com/uuid/

From this page they should be able to login with Soundcloud and should be redirected to this page after connecting.

I am using the following to get the previous link but I am receiving a good url in html but is empty on django.

#Html
<a href="/accounts/soundcloud/login?process=login?next={{request.path}}" name="next" value="next" class="waves-effect waves-light btn-large" style="margin-bottom: 10px;">Download</a>

#adapter.py
class AccountAdapter(DefaultAccountAdapter):

def get_login_redirect_url(self, request):
    #assert request.user.is_authenticated()
    #pass
    return request.GET['next']
Juanvulcano
  • 1,354
  • 3
  • 26
  • 44

1 Answers1

1

You have a typo in your url - it should be:

href="/accounts/soundcloud/login?process=login&next={{request.path}}"

Notice the & instead of the second ?.

YPCrumble
  • 26,610
  • 23
  • 107
  • 172
  • Thanks! I was just noticing that and trying with /accounts/soundcloud/login/?next={{request.path}}, is there any difference? – Juanvulcano Jul 26 '16 at 00:10
  • @Juanvulcano that would not include the `process` url parameter but it would include the `next` parameter. See for instance [this answer](http://stackoverflow.com/a/5767509/2532070) for more detail. – YPCrumble Jul 26 '16 at 00:12