Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@substrate/playground-client

Package Overview
Dependencies
Maintainers
11
Versions
80
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@substrate/playground-client - npm Package Compare versions

Comparing version 1.3.8 to 1.3.9

11

dist/browser/login.js

@@ -10,5 +10,6 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {

};
export function getVerification(githubClientId, scope = "user:read") {
// Scope can be: https://docs.github.com/en/developers/apps/scopes-for-oauth-apps
export function getVerification(githubClientId, scope = "read:user") {
return __awaiter(this, void 0, void 0, function* () {
const res = yield fetch(`https://github.com/login/device/code?client_id=${githubClientId}?scope=${scope}`, {
const res = yield fetch(`https://github.com/login/device/code?client_id=${githubClientId}&scope=${scope}`, {
method: 'POST',

@@ -18,2 +19,8 @@ headers: { 'Accept': 'application/json' }

const { device_code, user_code, verification_uri, expires_in, interval } = yield res.json();
// TODO handle errors
/*
{ error: 'invalid_scope',
error_description: 'The scopes requested are invalid: user:read.',
error_uri: 'https://docs.github.com' }
*/
return {

@@ -20,0 +27,0 @@ deviceCode: device_code,

@@ -40,4 +40,5 @@ "use strict";

exports.getAuthorization = exports.getVerification = void 0;
// Scope can be: https://docs.github.com/en/developers/apps/scopes-for-oauth-apps
function getVerification(githubClientId, scope) {
if (scope === void 0) { scope = "user:read"; }
if (scope === void 0) { scope = "read:user"; }
return __awaiter(this, void 0, void 0, function () {

@@ -47,3 +48,3 @@ var res, _a, device_code, user_code, verification_uri, expires_in, interval;

switch (_b.label) {
case 0: return [4 /*yield*/, fetch("https://github.com/login/device/code?client_id=" + githubClientId + "?scope=" + scope, {
case 0: return [4 /*yield*/, fetch("https://github.com/login/device/code?client_id=" + githubClientId + "&scope=" + scope, {
method: 'POST',

@@ -57,2 +58,8 @@ headers: { 'Accept': 'application/json' }

_a = _b.sent(), device_code = _a.device_code, user_code = _a.user_code, verification_uri = _a.verification_uri, expires_in = _a.expires_in, interval = _a.interval;
// TODO handle errors
/*
{ error: 'invalid_scope',
error_description: 'The scopes requested are invalid: user:read.',
error_uri: 'https://docs.github.com' }
*/
return [2 /*return*/, {

@@ -59,0 +66,0 @@ deviceCode: device_code,

2

package.json
{
"name": "@substrate/playground-client",
"version": "1.3.8",
"version": "1.3.9",
"description": "An isomorphic client for Substrate Playground",

@@ -5,0 +5,0 @@ "main": "dist/main/index.js",

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