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

angular-oauth2-oidc

Package Overview
Dependencies
Maintainers
1
Versions
95
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

angular-oauth2-oidc - npm Package Compare versions

Comparing version 2.0.11 to 2.0.12

17

angular-oauth2-oidc.umd.js

@@ -902,4 +902,6 @@ (function (global, factory) {

}
if (this.requestAccessToken && (!accessToken || !state))
if (this.requestAccessToken && !accessToken)
return Promise.resolve();
if (this.requestAccessToken && !options.disableOAuth2StateCheck && !state)
return Promise.resolve();
if (this.oidc && !idToken)

@@ -912,12 +914,3 @@ return Promise.resolve();

var /** @type {?} */ nonceInState = stateParts[0];
// Our state might be URL encoded
// Check for this and then decode it if it is
// TODO: Check this!
/*
let decodedState = decodeURIComponent(state);
if (decodedState != state) {
state = decodedState;
}
*/
if (this.requestAccessToken) {
if (this.requestAccessToken && !options.disableOAuth2StateCheck) {
var /** @type {?} */ success = this.validateNonceForAccessToken(accessToken, nonceInState);

@@ -929,2 +922,4 @@ if (!success) {

}
}
if (this.requestAccessToken) {
this.storeAccessTokenResponse(accessToken, null, parts['expires_in']);

@@ -931,0 +926,0 @@ }

@@ -911,4 +911,6 @@ import { Injectable, NgModule } from '@angular/core';

}
if (this.requestAccessToken && (!accessToken || !state))
if (this.requestAccessToken && !accessToken)
return Promise.resolve();
if (this.requestAccessToken && !options.disableOAuth2StateCheck && !state)
return Promise.resolve();
if (this.oidc && !idToken)

@@ -921,12 +923,3 @@ return Promise.resolve();

var /** @type {?} */ nonceInState = stateParts[0];
// Our state might be URL encoded
// Check for this and then decode it if it is
// TODO: Check this!
/*
let decodedState = decodeURIComponent(state);
if (decodedState != state) {
state = decodedState;
}
*/
if (this.requestAccessToken) {
if (this.requestAccessToken && !options.disableOAuth2StateCheck) {
var /** @type {?} */ success = this.validateNonceForAccessToken(accessToken, nonceInState);

@@ -938,2 +931,4 @@ if (!success) {

}
}
if (this.requestAccessToken) {
this.storeAccessTokenResponse(accessToken, null, parts['expires_in']);

@@ -940,0 +935,0 @@ }

{
"name": "angular-oauth2-oidc",
"version": "2.0.11",
"version": "2.0.12",
"repository": {

@@ -5,0 +5,0 @@ "type": "git",

@@ -30,2 +30,11 @@ /**

customHashFragment?: string;
/**
* Set this to true to disable the oauth2 state
* check which is a best practice to avoid
* security attacks.
* As OIDC defines a nonce check that includes
* this, this can be set to true when only doing
* OIDC.
*/
disableOAuth2StateCheck?: boolean;
}

@@ -32,0 +41,0 @@ /**

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