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

Fix popup mode when no id_token is returned #206

Merged
merged 1 commit into from
Sep 22, 2016
Merged

Fix popup mode when no id_token is returned #206

merged 1 commit into from
Sep 22, 2016

Conversation

rolodato
Copy link
Contributor

@rolodato rolodato commented Sep 22, 2016

Tested manually with:

<!doctype html>
<html>
<head><title>Popup mode without id_token test</title></head>
<body>
<script src="build/auth0.min.js"></script>
<script>
var auth0 = new Auth0({
    domain: '',
    clientID: '',
    responseType: 'token'
});
function afterLogin(err, result) {
    document.body.innerHTML = `<pre>${JSON.stringify(result, null, 2)}</pre>`;
}
function login() {
    auth0.login({
        popup: true,
        connection: 'google-oauth2',
        scope: ''
    }, afterLogin);
}
function apiLogin() {
    auth0.login({
        popup: true,
        connection: 'google-oauth2',
        scope: 'openid read:favorite_food',
        audience: 'https://myapi.example.com'
    }, afterLogin);
}
</script>
<a onclick="login()" href="#">Log in</a><br/>
<a onclick="apiLogin()" href="#">Log in + authorize to API</a>
</body>
</html>

@hzalaz hzalaz merged commit 3e62577 into auth0:master Sep 22, 2016
@hzalaz hzalaz added this to the v7.2.1 milestone Sep 22, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants