
Product
Announcing Bun and vlt Support in Socket
Bringing supply chain security to the next generation of JavaScript package managers
thaipbs-account-client
Advanced tools
JavaScript library for seamlessly authorization between sites under ThaiPBS (thaipbs.or.th)
JavaScript library for seamlessly authorization between sites under ThaiPBS (thaipbs.or.th)
Add this script tag in your web page:
<script src="https://account.thaipbs.or.th/sdk/thaipbs-account-client/v0.1.0/ThaiPBSAccountClient.js"></script>
You may also use this as a dependency via npm:
npm install thaipbs-account-client
Please note that when using via npm, you'll be required to use Babel to build your project.
To get current user info:
// For script tag, ThaiPBSAccountClient will be available globally.
// For npm, please import this.
//
// import ThaiPBSAccountClient from 'thaipbs-account-client';
var client = new ThaiPBSAccountClient();
var user = client.getUserInfo();
if (user) {
console.log('Current user id: ' + user.id);
console.log('Current user name: ' + user.name);
console.log('Current user image: ' + user.image);
}
To login:
function onClickLoginButton() {
client.authorize()
.then(function(data) {
if (data && data.user) {
// Hooray! The user is logged in.
}
});
}
To show profile or login screen (based on current status):
function onClickProfileButton() {
client.showProfile();
}
FAQs
JavaScript library for seamlessly authorization between sites under ThaiPBS (thaipbs.or.th)
We found that thaipbs-account-client demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Bringing supply chain security to the next generation of JavaScript package managers

Product
A safer, faster way to eliminate vulnerabilities without updating dependencies

Product
Reachability analysis for Ruby is now in beta, helping teams identify which vulnerabilities are truly exploitable in their applications.