floatplane
Advanced tools
+1
-1
@@ -10,3 +10,3 @@ import got from "got"; | ||
| import { Content } from "./content.js"; | ||
| export declare const version = "5.1.0"; | ||
| export declare const version = "5.1.1"; | ||
| export type AuthToken = TokenEndpointResponse & { | ||
@@ -13,0 +13,0 @@ expires_at?: Date; |
+4
-6
@@ -10,3 +10,3 @@ import got from "got"; | ||
| import { Content } from "./content.js"; | ||
| export const version = "5.1.0"; | ||
| export const version = "5.1.1"; | ||
| export class Floatplane { | ||
@@ -108,8 +108,5 @@ got; | ||
| deviceLogin = async (onDeviceCode = this.authConfig.onDeviceCode) => { | ||
| const scope = "openid profile email offline_access"; | ||
| if (this.oauthConfig === undefined) { | ||
| this.oauthConfig = await client.discovery(new URL(this.authConfig.serverUrl ?? "https://auth.floatplane.com/realms/floatplane"), this.authConfig.clientId, this.authConfig.clientSecret); | ||
| } | ||
| this.oauthConfig ??= await client.discovery(new URL(this.authConfig.serverUrl ?? "https://auth.floatplane.com/realms/floatplane"), this.authConfig.clientId, this.authConfig.clientSecret); | ||
| if (!this.authToken) { | ||
| const response = await client.initiateDeviceAuthorization(this.oauthConfig, { scope }); | ||
| const response = await client.initiateDeviceAuthorization(this.oauthConfig, { scope: "openid profile email offline_access" }); | ||
| await onDeviceCode(response); | ||
@@ -122,2 +119,3 @@ const authToken = await client.pollDeviceAuthorizationGrant(this.oauthConfig, response); | ||
| } | ||
| await this.refreshAuthToken(); | ||
| return this.user.self(); | ||
@@ -124,0 +122,0 @@ }; |
+1
-1
| { | ||
| "name": "floatplane", | ||
| "version": "5.1.0", | ||
| "version": "5.1.1", | ||
| "description": "Library for interfacing with the LMG Floatplane.com api", | ||
@@ -5,0 +5,0 @@ "type": "module", |
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
395888
-0.01%7940
-0.03%