🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

ngx-auth

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ngx-auth - npm Package Compare versions

Comparing version

to
2.1.0

2

package.json
{
"name": "ngx-auth",
"version": "2.0.3",
"version": "2.1.0",
"description": "Angular 4.3.0+ Authentication module",

@@ -5,0 +5,0 @@ "repository": "https://github.com/serhiisol/ngx-auth",

@@ -11,2 +11,5 @@ # Angular 4.3.0+ Authentication

## Full example
Full example you can find in this repo [serhiisol/ngx-auth-example](https://github.com/serhiisol/ngx-auth-example)
## Authentication module

@@ -13,0 +16,0 @@

@@ -55,3 +55,3 @@ import { Injectable, Inject } from '@angular/core';

if (!isAuthorized && !this.isPublicPage(state)) {
this.router.navigateByUrl( this.publicFallbackPageUri );
this.navigate(this.publicFallbackPageUri);

@@ -93,2 +93,17 @@ return false;

}
/**
* Navigate away from the app / path
*
* @private
* @param {string} url
*/
private navigate(url: string): void {
if (url.startsWith('http')) {
window.location.href = url;
} else {
this.router.navigateByUrl(url);
}
}
}

@@ -55,3 +55,3 @@ import { Injectable, Inject } from '@angular/core';

if (isAuthorized && !this.isProtectedPage(state)) {
this.router.navigateByUrl( this.protectedFallbackPageUri );
this.navigate(this.protectedFallbackPageUri);

@@ -93,2 +93,17 @@ return false;

}
/**
* Navigate away from the app / path
*
* @private
* @param {string} url
*/
private navigate(url: string): void {
if (url.startsWith('http')) {
window.location.href = url;
} else {
this.router.navigateByUrl(url);
}
}
}