Security News
UK Officials Consider Banning Ransomware Payments from Public Entities
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.
@nodeart/firebase-connector
Advanced tools
VkAuth
vk.com
is not among standard auth providers in firebase, so we provide our own solution for
this. To get acquainted with the flow, please, read this article.
In order to avoid creation of http server, vkAuthService works only with firebase and not with REST API. So, we strongly recommend to set redirect url to be a current location, thus one can get a token on a client side.
Internal work of a service one can found in source
Usage:
VkConfigService
declaration
//vkAuthConfig.service.ts
import {Injectable} from "@angular.core";
import {VkAuthConfig, VkConfig, PopupConfig} from "@nodeart/firebase-connector";
@Injectable()
export class VkConfig implements VkAuthConfig {
public vkConfig : VkConfig = {
client_id: 'app_id',
display: 'popup',
scope: ['friends'],
response_type: 'token',
v: 5.63
};
public popupConfig: PopupConfig = {
location: 'no',
height: 600,
width: 600
};
public cleanUp: true;
public dbPath: 'vkAuth';
constructor() { }
}
VkConfigService
register
//someModule.module.ts
import {NgModule} from "@angular/core";
import {VkConfig} from "./vkAuthConfig.service";
@NgModule({
providers: [
{provide: 'VkAuthConfig', useClass: VkConfig}
]
})
export class SomeModule { }
Server side or firebase cloud functions code:
'use strict';
const admin = require('firebase-admin');
const authWithVk = admin.database().ref('auth/vk');
const listener = (ref, snapshot) => {
const key = snapshot.key,
val = snapshot.val();
if (!val.processed) {
admin.auth()
.createCustomToken(val['access_token'])
.then(token => {
const data = Object.assign(val, {
access_token: token,
expires_in: null,
processed: true
});
ref.child(key).set(data);
return data
})
.then(data => console.log(`custom token generated = ${JSON.stringify(data)}`))
}
};
authWithVk.on('child_added', snapshot => listener(authWithVk, snapshot));
FAQs
**GoogleAuth**
The npm package @nodeart/firebase-connector receives a total of 18 weekly downloads. As such, @nodeart/firebase-connector popularity was classified as not popular.
We found that @nodeart/firebase-connector demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.
Security News
Snyk's use of malicious npm packages for research raises ethical concerns, highlighting risks in public deployment, data exfiltration, and unauthorized testing.
Research
Security News
Socket researchers found several malicious npm packages typosquatting Chalk and Chokidar, targeting Node.js developers with kill switches and data theft.