I am creating an authentication system where I am implementing social login, am using google, Facebook, and Twitter to log in or signup. Currently, to get the token from the browser by signing in I am using Javascript(which I know very little of) that I googled. I want to know if we can just use Postman to get the required tokens from Postman.
Here are the templates i used to log in for google and facebook: https://github.com/CryceTruly/social-auth-js-samples
but i couldn't find any for twitter This is all I could do:
<html>
<header>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css"></script>
<script src="https://code.jquery.com/jquery-3.2.1.min.js"></script>
<script src="https://cdn.rawgit.com/oauth-io/oauth-js/c5af4519/dist/oauth.js"></script>
<!-- <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-social/4.12.0/bootstrap-social.min.css"> -->
</header>
<body>
<a id="twitter-button" class="btn btn-block btn-social btn-twitter">
<i class="fa fa-twitter"></i> Sign in with Twitter
</a>
<script>
$('#twitter-button').on('click', function() {
// Initialize with your OAuth.io app public key
OAuth.initialize('my api key');
// Use popup for OAuth
OAuth.popup('twitter').then(twitter => {
console.log(twitter);
// Retrieves user data from oauth provider
console.log(twitter.me());
});
})
</script>
</body>
</html>
How can I successfully get the access_token_key and access_token_secret?