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.0.0-beta to 2.1.0-beta

4

package.json

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

"version": "2.0.0-beta",
"version": "2.1.0-beta",

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

"dependencies": {
"@websanova/vue-auth": "2.0.0-beta"
"@websanova/vue-auth": "2.1.0-beta"
},

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

@@ -468,2 +468,3 @@ # Vue Auth

* Accepts `redirect` parameter which is passed directly to router.
* Accepts `fetchUser` param which allows disabling fetching user after login.

@@ -477,2 +478,3 @@ ~~~

redirect: '/account',
fetchUser: true
// etc...

@@ -597,5 +599,6 @@ });

### loginData: `{url: 'auth/login', method: 'POST', redirect: '/'}`
### loginData: `{url: 'auth/login', method: 'POST', redirect: '/', fetchUser: true}`
* Default login request data and redirect.
* To disable user fetching on login set the `fetchUser` to `false`.

@@ -701,2 +704,3 @@ ### logoutData: `{url: 'auth/logout', method: 'POST', redirect: '/', makeRequest: false}`

* The options for `router`, `http` and `auth` must be set now and will not auto bind (this is because webpack would pre load all drivers with dynamic variable).
* Added `loginData.fetchUser` option to allow disabling of user fetch on login (which will also be disabled on refreshes).

@@ -703,0 +707,0 @@

@@ -106,3 +106,3 @@ var __utils = require('./lib/utils.js'),

function _check(role) {
if (this.watch.data !== null) {
if (this.watch.authenticated === true) {
if (role) {

@@ -142,3 +142,8 @@ return __utils.compare(role, this.watch.data[this.options.rolesVar]);

__duckPunch.call(this, 'fetch', data);
if (this.watch.authenticated !== true && !this.options.loginData.fetchUser) {
_fetchProcess.call(this, {}, data);
}
else {
__duckPunch.call(this, 'fetch', data);
}
}

@@ -220,3 +225,3 @@

this.authenticated = false;
this.watch.authenticated = false;
this.watch.data = null;

@@ -340,3 +345,3 @@

registerData: {url: 'auth/register', method: 'POST', redirect: '/login'},
loginData: {url: 'auth/login', method: 'POST', redirect: '/'},
loginData: {url: 'auth/login', method: 'POST', redirect: '/', fetchUser: true},
logoutData: {url: 'auth/logout', method: 'POST', redirect: '/', makeRequest: false},

@@ -343,0 +348,0 @@ oauth1Data: {url: 'auth/login', method: 'POST'},

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