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

@websanova/vue-auth

Package Overview
Dependencies
Maintainers
1
Versions
151
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@websanova/vue-auth - npm Package Compare versions

Comparing version 2.4.0-beta to 2.4.1-beta

4

package.json

@@ -17,3 +17,3 @@ {

"version": "2.4.0-beta",
"version": "2.4.1-beta",

@@ -28,3 +28,3 @@ "repository": {

"dependencies": {
"@websanova/vue-auth": "2.4.0-beta"
"@websanova/vue-auth": "2.4.1-beta"
},

@@ -31,0 +31,0 @@

@@ -440,2 +440,32 @@ # Vue Auth

### transition
* Fetch the state of the transition as vue-auth sees it.
* Useful for doing redirects when accessing restricted routes.
The transitions come in five states:
* **logged-out-hidden** - The user is logged out and accessing a log in required page.
* **logged-out-visible** - The user is logged out and accessing a public page.
* **logged-in-forbidden** - Logged in but without access to that page.
* **logged-in-visible** - Logged in and accessing a page visible to any logged in user.
* **logged-in-hidden** - Logged in and accessing a hidden page, for instance the login page while logged in.
The function is primarily useful for setting a redirect url if trying to access a private page when logged out.
In the root component (1.x example):
~~~
ready() {
this.$router.beforeEach(function (transition) {
if (_this.$auth.transition().from === 'logged-out-hidden') {
_this.$router.go({path: '/login', query: {redirect_url: _this.$route.path}});
}
else {
transition.next();
}
});
}
~~~
### user

@@ -442,0 +472,0 @@

@@ -21,2 +21,3 @@ var Auth = require('./auth.js')();

get: function () {
auth.ready = ready.bind(this);
auth.login = login.bind(this);

@@ -23,0 +24,0 @@ auth.fetch = fetch.bind(this);

Sorry, the diff of this file is not supported yet

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