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

popup not closing at /callback url #1136

Open
ether9 opened this issue Feb 28, 2019 · 1 comment
Open

popup not closing at /callback url #1136

ether9 opened this issue Feb 28, 2019 · 1 comment

Comments

@ether9
Copy link

ether9 commented Feb 28, 2019

My setup:
127.0.0.1:5000 - Frontend app with satellizer served on this port
127.0.0.1:8000 - Backend api/server with required auth urls

Satellizer settings in my apps config:

$authProvider.linkedin({
        clientId: 'MYCLIENTID',
        authorizationEndpoint: 'https://www.linkedin.com/uas/oauth2/authorization',
        url: 'http://127.0.0.1:8000/auth/social/linkedin/login/',
        redirectUri: 'http://127.0.0.1:8000/auth/social/linkedin/callback'
      });

What happens:
When I click the authenticate button the popup loads as expected and goes to the LinkedIn authorizationEndpoint set in the $authProvider.linkedin.

After entering the credentials it authenticates with LinkedIn as expected and then redirects to my callback url (the redirectUri setting in $authProvider.linkedin).

This is the callback url it loads: (blank page, status code 200)

http://127.0.0.1:8000/auth/social/linkedin/callback?code=AQQT4Xv_0w2bwhggtXfIcs9P0VJzL5EFjKsl2LuO4g0igX_wwaGl6bmfET1bi_AnPAPNbMid9FyQqXxw_DmnJ7KRDEc7xUmK1Vt6_BzcCriGPRQiMGXedE2GiiUnyk-Jh64jqD0-b1z0tdKaqRwDFvIUXJgTwKvzicA16GTYvYr6kIIrX6Xc40QgGmx3h&state=STATE

The popup window hangs on this page and does not get the 'code' and POST it to the social auth backend url http://127.0.0.1:8000/api/auth/social/linkedin/login/.

@ijajmulani
Copy link

ijajmulani commented Dec 11, 2019

It wont close.
callback url is your domain url. So you have to render a html page with below content for your callback url.

<html>
<head>
  <title>VIDEOMINE</title>
</head>
<body>
  <script>
    window.close()   
  </script>
</html>

e.g
The golang controller function which calls when callback handler is hit
image

I have created below file which render when our callback url hits.
image

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

2 participants