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

Can not set HTTPS-Protocol #290

Closed
likont opened this issue Jan 28, 2020 · 2 comments
Closed

Can not set HTTPS-Protocol #290

likont opened this issue Jan 28, 2020 · 2 comments

Comments

@likont
Copy link

likont commented Jan 28, 2020

Facebook requir redirect URL only with HTTPS-protocol(http://ipic.su/img/img7/fs/kiss_9kb.1580221427.png).
But extension generate just HTTP URL.
Method \yii\authclient\BaseOAuth::defaultReturnUrl use createAbsoluteUrl() for generate redirect URL, but can not change second param and set HTTPS-protocol. As result we has HTTP link which Facebook does not allow: http://ipic.su/img/img7/fs/kiss_10kb.1580221485.png
Json encoded response: http://ipic.su/img/img7/fs/kiss_6kb.1580221550.png

Q A
Yii version 2.0.32
Yii Auth Client version 2.1
Yii HTTP Client version Not used.
PHP version 7.2.2
Operating system CentOS 7
@samdark
Copy link
Member

samdark commented Jan 28, 2020

BaseOAuth::defaultReturnUrl() doesn't specify protocol. It means return URL generated matches protocol used at the website. If your website is served via HTTP it doesn't make sense to set return URL to HTTPS.

@samdark samdark closed this as completed Jan 28, 2020
@temposys
Copy link

temposys commented Nov 24, 2022

I have the same problem. My case: i use AWS Certificate manager + Application Load balancer
so my site uses http protocol and server doesn't know anything about ssl and load balancer makes it to be https for users.
and in this case code generates http links and facebook login doesn't work.

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