New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@sketchfab/oauth2

Package Overview
Dependencies
Maintainers
3
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sketchfab/oauth2

A JavaScript browser library for connecting to a Sketchfab account with OAuth2

  • 1.1.0
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
39
decreased by-58.95%
Maintainers
3
Weekly downloads
 
Created
Source

SketchfabOAuth2

SketchfabOAuth2 is a JS browser library for connecting to a Sketchfab account with OAuth2. This library only support the Implicit flow.

Usage

To use OAuth2, you need to register your app on Sketchfab.

Insert the script in your HTML page

<script src="../dist/sketchfab-oauth2-1.1.0.js" type="text/javascript"></script>

Here's how to use the library:

var config = {
    hostname: 'sketchfab.com',
    client_id: 'INSERT_YOUR_CLIENT_ID_HERE',
    redirect_uri: 'http://example.com/authSuccess.html'
};

var client = new SketchfabOAuth2( config );

client.connect().then( function onSuccess( grant ) {
    console.log( grant );
} ).catch( function onError( error ) {
    console.error( error );
} );

Development

  • npm install
  • Source is in src
  • Run npm run build to build the browser library

FAQs

Package last updated on 04 Nov 2021

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc