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

auth-component

Package Overview
Dependencies
Maintainers
2
Versions
35
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

auth-component - npm Package Compare versions

Comparing version 3.1.0 to 3.1.1

4

package.json
{
"name": "auth-component",
"version": "3.1.0",
"version": "3.1.1",
"description": "Simple authentication utilities for DoneJS",

@@ -67,3 +67,2 @@ "homepage": "https://github.com/icanjs/auth-component",

"can-define": "^0.8.2",
"can-route": "^3.0.0-pre.9",
"can-stache": "^3.0.0-pre.21",

@@ -74,3 +73,2 @@ "can-stache-bindings": "^3.0.0-pre.23",

"devDependencies": {
"can-route": "^3.0.0-pre.18",
"can-view-autorender": "^3.0.0-pre.4",

@@ -77,0 +75,0 @@ "cssify": "^0.6.0",

@@ -12,5 +12,7 @@ import Component from 'can-component';

local: {
type: 'string'
},
/*
* Specifies the type of local authentication used. For now, the only option is
* 'password', but 'passwordless' will be supported in the future.
*/
local: 'string',

@@ -24,8 +26,3 @@ /**

set(val){
if (val === 'none' || val === 'false') {
val = false;
} else {
val = true;
}
return val;
return !!val;
}

@@ -61,15 +58,12 @@ },

providerList = this.providers.split(',')
// filter out any duds.
// filter out any unsupported providers.
.filter(provider => {
let providerArray = Object.keys(providerIcons);
return providerArray.indexOf(provider.trim()) > -1;
return Object.keys(providerIcons).indexOf(provider.trim()) > -1;
})
.map(provider => {
if (provider) {
provider = provider.trim();
return {
name: provider,
template: providerIcons[provider]
};
}
provider = provider.trim();
return {
name: provider,
template: providerIcons[provider]
};
});

@@ -81,2 +75,5 @@ }

/*
* An object containing svg logos of the providers, keyed by name.
*/
providerIcons: {

@@ -107,11 +104,10 @@ value: providerIcons

if (this.providerList){
if(this.providerList.length === 1) {
return 'one';
switch (this.providerList.length) {
case 1:
return 'one';
case 2:
return 'two';
default:
return 'many';
}
if (this.providerList && this.providerList.length === 2) {
return 'two';
}
if (this.providerList.length > 2) {
return 'many';
}
}

@@ -125,12 +121,15 @@ return this.providerList && this.providerList.length;

* the appstate's session once the user has logged in.
* TODO: eliminate the need for this by implementing streams in app.js
*/
session: {
type: '*'
},
session: '*',
/*
* The Session can-connect model.
*/
sessionModel: {},
/**
* The name of the currently active tab. Bind this to an attribute in your routes
* to make it update the route.
* The name of the currently active tab. Bind this to a route attribute to change
* the tab based on the route. If signup is enabled, 'signup' is the default value,
* otherwise it's 'login'.
*/

@@ -146,10 +145,2 @@ activeTab: {

email: {
type: 'string'
},
password: {
type: 'string'
},
login(ev, email, password) {

@@ -160,3 +151,3 @@ ev.preventDefault();

if (!Session) {
console.error('A session model must be provided to the auth-component.');
console.error('A session-model must be provided to the auth-component.');
}

@@ -163,0 +154,0 @@

@@ -7,2 +7,5 @@ import Component from 'can-component';

export const ViewModel = DefineMap.extend({
email: 'string',
password: 'string',
// The baseUrl of the OAuth server to which you're authenticating.

@@ -13,5 +16,3 @@ baseUrl: {

activeTab: {
type: 'string'
},
activeTab: 'string',

@@ -18,0 +19,0 @@ setActiveTab(tabName) {

Sorry, the diff of this file is not supported yet

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