Skip to content

Instantly share code, notes, and snippets.

@thameera
Created May 30, 2017 03:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thameera/c8a37a005d48dc4a994882cdb7bd7010 to your computer and use it in GitHub Desktop.
Save thameera/c8a37a005d48dc4a994882cdb7bd7010 to your computer and use it in GitHub Desktop.
Auth0.js 7.6 popup mode - linkedin
<!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