Skip to content
This repository has been archived by the owner on Feb 22, 2024. It is now read-only.

Use absolute URL for redirect_url. Excepts that SERVER_NAME variable is ... #66

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions flask_social/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ def get_authorize_callback(endpoint, provider_id):
param: endpoint: Absolute path to append to the application's host
"""
endpoint_prefix = config_value('BLUEPRINT_NAME')
url = url_for(endpoint_prefix + '.' + endpoint, provider_id=provider_id)
return request.url_root[:-1] + url
url = url_for(endpoint_prefix + '.' + endpoint, provider_id=provider_id, _external=True)
return url


def get_connection_values_from_oauth_response(provider, oauth_response):
Expand Down