Skip to content
This repository has been archived by the owner on Sep 7, 2023. It is now read-only.

Use @login_required next parameter #10

Open
cgwhitehead opened this issue Jan 24, 2017 · 0 comments
Open

Use @login_required next parameter #10

cgwhitehead opened this issue Jan 24, 2017 · 0 comments

Comments

@cgwhitehead
Copy link

This is an awesome library that saved me a lot of time. After I implemented it, I was using the login_required decorator on my views, but noticed the next parameter was not working as it was not passed to the callback url and so the success redirect defaulted to the url in my settings.

##How this feature would work
In auth_helper.py it would check for a next parameter. If one exists, it would redirect to the next url. If no next parameter is passed, then you would redirect to the default success url.

##Customizing the lock
I just added a variable that appended location.search to the end of my callback url. Then the next parameter was available in the request.GET. I put an example on the readme in my fork.

##Working on my fork
I tried this on my fork, but I haven't built tests or checked for python versions other than 3.6.

I'm sorry if this breaks any protocol. I'm pretty new, and this would be the first time I've contributed.
Is this a feature that would benefit the project?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant