Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

passing callback url to authorize #7

Closed
rochacbruno opened this issue Jul 31, 2014 · 7 comments
Closed

passing callback url to authorize #7

rochacbruno opened this issue Jul 31, 2014 · 7 comments

Comments

@rochacbruno
Copy link

Hi, in the docs there is:

def authorized_handler(self, f):
        """
        Decorator for the route that is used as the callback for authorizing
        with GitHub. This callback URL can be set in the settings for the app
        or passed in during authorization.

        """

https://github.com/cenkalti/github-flask/blob/master/flask_github.py#L98

But there is no such parameter in authorize

def authorize(self, scope=None):
        """
        Redirect to GitHub and request access to a user's data.

        """

https://github.com/cenkalti/github-flask/blob/master/flask_github.py#L77

How can I pass the callback url during the authorization?

@cenkalti
Copy link
Owner

cenkalti commented Aug 1, 2014

I guess the documentation is wrong. The callback_url can only be set in the app settings.
Anyway, why do you want to set it during authorization?

@rochacbruno
Copy link
Author

I need to pass a myurl/callback/?next=/another/path

@cenkalti
Copy link
Owner

cenkalti commented Aug 1, 2014

I have made the change: 6e12328

I haven't tested it yet but it should work. Make sure that you are passing a valid URL:
https://developer.github.com/v3/oauth/#redirect-urls

@cenkalti
Copy link
Owner

cenkalti commented Aug 7, 2014

Did it work? If yes, I will push a new version to PyPI.

@HelloGrayson
Copy link
Contributor

no tests :(

@cenkalti
Copy link
Owner

cenkalti commented Oct 2, 2014

In my opinion this is a small change that does not need testing. Please re-open if not working.

@cenkalti cenkalti closed this as completed Oct 2, 2014
@cenkalti
Copy link
Owner

cenkalti commented Oct 2, 2014

I have added redirect_uri parameter to tests. 038be00

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

No branches or pull requests

3 participants