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

nativescript-oauth2

Package Overview
Dependencies
Maintainers
1
Versions
38
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nativescript-oauth2 - npm Package Compare versions

Comparing version 2.3.1 to 2.4.0

2

index.d.ts

@@ -62,5 +62,5 @@ /// <reference path="./providers/providers.d.ts" />

urlScheme?: string,
completion?: TnsOAuthClientLoginBlock
completion?: TnsOAuthClientLogoutBlock
);
resumeWithUrl(url: string);
}
{
"name": "nativescript-oauth2",
"version": "2.3.1",
"version": "2.4.0",
"description": "OAuth 2 generic authorization plugin for NativeScript that doesn't install third party native libraries",

@@ -5,0 +5,0 @@ "main": "oauth",

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var TnsOAuthState = (function () {
function TnsOAuthState(codeVerifier, loginCompletion, urlScheme) {
function TnsOAuthState(codeVerifier, isLogout, loginCompletion, urlScheme) {
this._loginCompletion = loginCompletion;
this._codeVerifier = codeVerifier;
this._urlScheme = urlScheme;
this._isLogout = isLogout;
}

@@ -30,2 +31,9 @@ Object.defineProperty(TnsOAuthState.prototype, "loginCompletion", {

});
Object.defineProperty(TnsOAuthState.prototype, "isLogout", {
get: function () {
return this._isLogout;
},
enumerable: true,
configurable: true
});
return TnsOAuthState;

@@ -32,0 +40,0 @@ }());

@@ -22,3 +22,3 @@ "use strict";

}
this.authState = new tns_oauth_auth_state_1.TnsOAuthState(this.client.codeVerifier, completion);
this.authState = new tns_oauth_auth_state_1.TnsOAuthState(this.client.codeVerifier, false, completion);
return tns_oauth_utils_1.getAuthUrlStr(this.client.provider, codeChallenge);

@@ -32,3 +32,3 @@ };

}
this.authState = new tns_oauth_auth_state_1.TnsOAuthState(this.client.codeVerifier, completion);
this.authState = new tns_oauth_auth_state_1.TnsOAuthState(this.client.codeVerifier, true, completion);
return tns_oauth_utils_1.getLogoutUrlStr(this.client.provider, this.client);

@@ -38,7 +38,14 @@ };

if (this.authState) {
var codeExchangeRequestUrl = this.codeExchangeRequestUrlFromRedirectUrl(url);
if (codeExchangeRequestUrl) {
this.codeExchangeWithUrlCompletion(codeExchangeRequestUrl, completion);
if (this.authState.isLogout && url === this.client.provider.options.redirectUri) {
this.client.logout();
completion(undefined);
return true;
}
else {
var codeExchangeRequestUrl = this.codeExchangeRequestUrlFromRedirectUrl(url);
if (codeExchangeRequestUrl) {
this.codeExchangeWithUrlCompletion(codeExchangeRequestUrl, completion);
return true;
}
}
}

@@ -45,0 +52,0 @@ return false;

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