Created
May 30, 2017 03:21
-
-
Save thameera/c8a37a005d48dc4a994882cdb7bd7010 to your computer and use it in GitHub Desktop.
Auth0.js 7.6 popup mode - linkedin
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<body> | |
<script src="//cdn.auth0.com/w2/auth0-7.6.1.min.js"></script> | |
<button type="button" onclick="login()">Log in</button> | |
<script type="text/javascript"> | |
var auth0 = new Auth0({ | |
domain: 'tham.auth0.com', | |
clientID: 'MY_CLIENT_ID', | |
responseType: 'token', | |
callbackURL: 'http://localhost:3000/linkedin.html' | |
}); | |
var login = function() { | |
auth0.login({ | |
popup: true, | |
connection: 'linkedin' | |
}, | |
function(err, res) { | |
if (err) { | |
console.log('ERR'); | |
console.log(err); | |
} else { | |
console.log(res); | |
} | |
}); | |
}; | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment